fix: the $file decorator resolves wrong path to the file #2238
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Smoke tests | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
env: | |
CI: true | |
REDOCLY_TELEMETRY: off | |
jobs: | |
prepare-smoke: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
- name: Prepare Smoke | |
run: bash ./__tests__/smoke/prepare-smoke.sh | |
- uses: actions/cache@v3 | |
with: | |
path: __tests__/smoke/ | |
key: cache-${{ github.run_id }}-${{ github.run_attempt }} | |
run-smoke--npm--node-22: | |
needs: prepare-smoke | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/cache@v3 | |
with: | |
path: __tests__/smoke/ | |
key: cache-${{ github.run_id }}-${{ github.run_attempt }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 22 | |
- run: bash ./__tests__/smoke/run-smoke.sh "npm i redocly-cli.tgz" "npm run" | |
run-smoke--npm--node-22--redoc: | |
needs: prepare-smoke | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/cache@v3 | |
with: | |
path: __tests__/smoke/ | |
key: cache-${{ github.run_id }}-${{ github.run_attempt }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 22 | |
- run: bash ./__tests__/smoke/run-smoke.sh "npm i redoc redocly-cli.tgz" "npm run" | |
run-smoke--npm--node-20: | |
needs: prepare-smoke | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/cache@v3 | |
with: | |
path: __tests__/smoke/ | |
key: cache-${{ github.run_id }}-${{ github.run_attempt }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- run: bash ./__tests__/smoke/run-smoke.sh "npm i redocly-cli.tgz" "npm run" | |
run-smoke--npm--node-20--redoc: | |
needs: prepare-smoke | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/cache@v3 | |
with: | |
path: __tests__/smoke/ | |
key: cache-${{ github.run_id }}-${{ github.run_attempt }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- run: bash ./__tests__/smoke/run-smoke.sh "npm i redoc redocly-cli.tgz" "npm run" | |
run-smoke--npm--node-18: | |
needs: prepare-smoke | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/cache@v3 | |
with: | |
path: __tests__/smoke/ | |
key: cache-${{ github.run_id }}-${{ github.run_attempt }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- run: bash ./__tests__/smoke/run-smoke.sh "npm i redocly-cli.tgz" "npm run" | |
run-smoke--npm--node-18--redoc: | |
needs: prepare-smoke | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/cache@v3 | |
with: | |
path: __tests__/smoke/ | |
key: cache-${{ github.run_id }}-${{ github.run_attempt }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- run: bash ./__tests__/smoke/run-smoke.sh "npm i redoc redocly-cli.tgz" "npm run" | |
run-smoke--yarn--node-22: | |
needs: prepare-smoke | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/cache@v3 | |
with: | |
path: __tests__/smoke/ | |
key: cache-${{ github.run_id }}-${{ github.run_attempt }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 22 | |
- run: bash ./__tests__/smoke/run-smoke.sh "yarn add ./redocly-cli.tgz" "yarn" | |
run-smoke--yarn--node-22--redoc: | |
needs: prepare-smoke | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/cache@v3 | |
with: | |
path: __tests__/smoke/ | |
key: cache-${{ github.run_id }}-${{ github.run_attempt }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 22 | |
- run: bash ./__tests__/smoke/run-smoke.sh "yarn add redoc ./redocly-cli.tgz" "yarn" | |
run-smoke--yarn--node-20: | |
needs: prepare-smoke | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/cache@v3 | |
with: | |
path: __tests__/smoke/ | |
key: cache-${{ github.run_id }}-${{ github.run_attempt }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- run: bash ./__tests__/smoke/run-smoke.sh "yarn add ./redocly-cli.tgz" "yarn" | |
run-smoke--yarn--node-20--redoc: | |
needs: prepare-smoke | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/cache@v3 | |
with: | |
path: __tests__/smoke/ | |
key: cache-${{ github.run_id }}-${{ github.run_attempt }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- run: bash ./__tests__/smoke/run-smoke.sh "yarn add redoc ./redocly-cli.tgz" "yarn" | |
run-smoke--yarn--node-18: | |
needs: prepare-smoke | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/cache@v3 | |
with: | |
path: __tests__/smoke/ | |
key: cache-${{ github.run_id }}-${{ github.run_attempt }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- run: bash ./__tests__/smoke/run-smoke.sh "yarn add ./redocly-cli.tgz" "yarn" | |
run-smoke--yarn--node-18--redoc: | |
needs: prepare-smoke | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/cache@v3 | |
with: | |
path: __tests__/smoke/ | |
key: cache-${{ github.run_id }}-${{ github.run_attempt }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- run: bash ./__tests__/smoke/run-smoke.sh "yarn add redoc ./redocly-cli.tgz" "yarn" | |
run-smoke--webpack--node-22: | |
needs: prepare-smoke | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/cache@v3 | |
with: | |
path: __tests__/smoke/ | |
key: cache-${{ github.run_id }}-${{ github.run_attempt }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 22 | |
- run: | | |
cd __tests__/smoke/ | |
node bundle.js --version | |
node bundle.js lint openapi.yaml --extends minimal | |
node bundle.js bundle openapi.yaml | |
run-smoke--npm--node-22--windows: | |
needs: prepare-smoke | |
runs-on: windows-latest | |
steps: | |
- uses: actions/cache@v3 | |
with: | |
path: __tests__/smoke/ | |
key: cache-${{ github.run_id }}-${{ github.run_attempt }} | |
enableCrossOsArchive: true | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 22 | |
- run: bash ./__tests__/smoke/run-smoke.sh "npm i redocly-cli.tgz" "npm run" | |
run-smoke--yarn--node-22--windows: | |
needs: prepare-smoke | |
runs-on: windows-latest | |
steps: | |
- uses: actions/cache@v3 | |
with: | |
path: __tests__/smoke/ | |
key: cache-${{ github.run_id }}-${{ github.run_attempt }} | |
enableCrossOsArchive: true | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 22 | |
- run: bash ./__tests__/smoke/run-smoke.sh "yarn add ./redocly-cli.tgz" "yarn" | |
run-smoke--npm--node-20--windows: | |
needs: prepare-smoke | |
runs-on: windows-latest | |
steps: | |
- uses: actions/cache@v3 | |
with: | |
path: __tests__/smoke/ | |
key: cache-${{ github.run_id }}-${{ github.run_attempt }} | |
enableCrossOsArchive: true | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- run: bash ./__tests__/smoke/run-smoke.sh "npm i redocly-cli.tgz" "npm run" | |
run-smoke--yarn--node-20--windows: | |
needs: prepare-smoke | |
runs-on: windows-latest | |
steps: | |
- uses: actions/cache@v3 | |
with: | |
path: __tests__/smoke/ | |
key: cache-${{ github.run_id }}-${{ github.run_attempt }} | |
enableCrossOsArchive: true | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- run: bash ./__tests__/smoke/run-smoke.sh "yarn add ./redocly-cli.tgz" "yarn" | |
run-smoke--npm--node-18--windows: | |
needs: prepare-smoke | |
runs-on: windows-latest | |
steps: | |
- uses: actions/cache@v3 | |
with: | |
path: __tests__/smoke/ | |
key: cache-${{ github.run_id }}-${{ github.run_attempt }} | |
enableCrossOsArchive: true | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- run: bash ./__tests__/smoke/run-smoke.sh "npm i redocly-cli.tgz" "npm run" | |
run-smoke--yarn--node-18--windows: | |
needs: prepare-smoke | |
runs-on: windows-latest | |
steps: | |
- uses: actions/cache@v3 | |
with: | |
path: __tests__/smoke/ | |
key: cache-${{ github.run_id }}-${{ github.run_attempt }} | |
enableCrossOsArchive: true | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- run: bash ./__tests__/smoke/run-smoke.sh "yarn add ./redocly-cli.tgz" "yarn" | |
run-smoke--docker-image: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build docker image | |
run: docker build -t redocly/cli:latest . | |
- name: Run docker image | |
run: | | |
# Prepare | |
cp resources/pets.yaml resources/museum.yaml __tests__/smoke/ | |
cd __tests__/smoke/ | |
# Run commands | |
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 | |
docker run --rm -v $PWD:/spec redocly/cli:latest split pets.yaml --outDir output/split/petstore && docker run --rm -v $PWD:/spec redocly/cli:latest split museum.yaml --outDir output/split/museum | |
# Check for broken styles when building docs (related issue: https://github.com/Redocly/redocly-cli/issues/1073) | |
echo "Checking docs for issues..." | |
diff pre-built/redoc.html redoc-static.html | |
echo "✅ Docs built correctly." | |
# Check for broken $refs (or other issues) in the split files, especially on Windows (it will fail on a difference) | |
echo "Checking split files for issues..." | |
diff -r pre-split output/split | |
echo "✅ Files split correctly." |