mirror of
https://github.com/LukeHagar/redocly-cli.git
synced 2025-12-06 04:21:09 +00:00
fix: resolve problem with docker build (#1182)
This commit is contained in:
27
.github/workflows/smoke.yaml
vendored
27
.github/workflows/smoke.yaml
vendored
@@ -252,3 +252,30 @@ jobs:
|
||||
with:
|
||||
node-version: 18
|
||||
- run: bash ./__tests__/smoke/run-smoke.sh "yarn add ./redocly-cli-clean.tgz" "yarn" # FIXME: Use actual openapi-core
|
||||
|
||||
run-docker-image:
|
||||
needs: prepare-smoke
|
||||
runs-on: ubuntu-latest
|
||||
name: Test Docker Image
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: __tests__/smoke
|
||||
key: cache-${{ github.run_id }}-${{ github.run_attempt }}
|
||||
- name: Build docker image
|
||||
run: docker build -t redocly/cli:latest .
|
||||
- name: Run docker image
|
||||
run: |
|
||||
cd __tests__/smoke/
|
||||
docker run --rm redocly/cli:latest --version
|
||||
docker run --rm -v $PWD:/spec redocly/cli:latest lint openapi.yaml
|
||||
docker run --rm -v $PWD:/spec redocly/cli:latest bundle openapi.yaml --ext json
|
||||
docker run --rm -v $PWD:/spec redocly/cli:latest build-docs openapi.yaml
|
||||
# Check for broken styles (related issue: https://github.com/Redocly/redocly-cli/issues/1073)
|
||||
if [[ "$(wc -l redoc-static.html)" == "317 redoc-static.html" ]]; then
|
||||
echo "Docs built correctly."
|
||||
else
|
||||
echo "Docs built incorrectly. Received lines: $(wc -l redoc-static.html) (expected 317 lines in redoc-static.html)."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
"engineStrict": true,
|
||||
"scripts": {
|
||||
"compile": "tsc",
|
||||
"copy-assets": "cp src/commands/preview-docs/preview-server/default.hbs lib/commands/preview-docs/preview-server/default.hbs && cp src/commands/preview-docs/preview-server/hot.js lib/commands/preview-docs/preview-server/hot.js && cp src/commands/preview-docs/preview-server/oauth2-redirect.html lib/commands/preview-docs/preview-server/oauth2-redirect.html && cp src/commands/build-docs/template.hbs lib/commands/build-docs/template.hbs && cp ../../README.md .",
|
||||
"copy-assets": "cp src/commands/preview-docs/preview-server/default.hbs lib/commands/preview-docs/preview-server/default.hbs && cp src/commands/preview-docs/preview-server/hot.js lib/commands/preview-docs/preview-server/hot.js && cp src/commands/preview-docs/preview-server/oauth2-redirect.html lib/commands/preview-docs/preview-server/oauth2-redirect.html && cp src/commands/build-docs/template.hbs lib/commands/build-docs/template.hbs ",
|
||||
"prepack": "npm run copy-assets",
|
||||
"prepublishOnly": "npm run copy-assets"
|
||||
"prepublishOnly": "npm run copy-assets && cp ../../README.md ."
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
Reference in New Issue
Block a user