mirror of
https://github.com/LukeHagar/redocly-cli.git
synced 2025-12-06 04:21:09 +00:00
chore: job for testing new version (#1184)
This commit is contained in:
41
.github/workflows/deploy.yaml
vendored
41
.github/workflows/deploy.yaml
vendored
@@ -109,3 +109,44 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.docker_meta.outputs.tags }}
|
tags: ${{ steps.docker_meta.outputs.tags }}
|
||||||
labels: ${{ steps.docker_meta.outputs.labels }}
|
labels: ${{ steps.docker_meta.outputs.labels }}
|
||||||
|
test-released-version:
|
||||||
|
needs:
|
||||||
|
- test
|
||||||
|
- deploy
|
||||||
|
- publish
|
||||||
|
- dockerhub
|
||||||
|
name: Test released version
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
|
- name: Install CLI from npm
|
||||||
|
run: npm i -g @redocly/cli@latest
|
||||||
|
- name: Test version from NPM
|
||||||
|
run: |
|
||||||
|
expected_version="$(cat package.json | jq -r '.version')"
|
||||||
|
actual_version="$(redocly --version)"
|
||||||
|
if [[ $expected_version == $actual_version ]]; then
|
||||||
|
echo "The version is correct. Actual version: $actual_version"
|
||||||
|
else
|
||||||
|
echo "The version is incorrect. Expected: $expected_version, actual: $actual_version"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
redocly lint https://raw.githubusercontent.com/Rebilly/api-definitions/main/openapi/openapi.yaml
|
||||||
|
redocly bundle https://raw.githubusercontent.com/Rebilly/api-definitions/main/openapi/openapi.yaml
|
||||||
|
redocly build-docs https://raw.githubusercontent.com/Rebilly/api-definitions/main/openapi/openapi.yaml
|
||||||
|
- name: Pull docker image
|
||||||
|
run: docker pull redocly/cli:latest
|
||||||
|
- name: Test docker image
|
||||||
|
run: |
|
||||||
|
expected_version="$(cat package.json | jq -r '.version')"
|
||||||
|
actual_version="$(docker run --rm redocly/cli --version)"
|
||||||
|
if [[ $expected_version == $actual_version ]]; then
|
||||||
|
echo "The version is correct. Actual version: $actual_version"
|
||||||
|
else
|
||||||
|
echo "The version is incorrect. Expected: $expected_version, actual: $actual_version"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
docker run --rm redocly/cli lint https://raw.githubusercontent.com/Rebilly/api-definitions/main/openapi/openapi.yaml
|
||||||
|
docker run --rm redocly/cli bundle https://raw.githubusercontent.com/Rebilly/api-definitions/main/openapi/openapi.yaml
|
||||||
|
docker run --rm redocly/cli build-docs https://raw.githubusercontent.com/Rebilly/api-definitions/main/openapi/openapi.yaml
|
||||||
|
|||||||
Reference in New Issue
Block a user