feat(ci): enforce e2e tests pass before publishing

This commit is contained in:
Lucas Nogueira
2026-09-25 13:27:31 -03:00
parent 1e166e93c8
commit b870626a5e
4 changed files with 50 additions and 2 deletions
@@ -19,7 +19,45 @@ permissions:
pull-requests: write
jobs:
# covector publishes once no change files are left (the version update PR consumed them) and
# otherwise opens that PR, which does not need the tests below.
check-publish:
runs-on: ubuntu-latest
outputs:
publish: ${{ steps.check.outputs.publish }}
steps:
- uses: actions/checkout@v7
- id: check
run: |
if find .changes -maxdepth 1 -name '*.md' ! -iname 'readme.md' | grep -q .; then
echo "publish=false" >> "$GITHUB_OUTPUT"
else
echo "publish=true" >> "$GITHUB_OUTPUT"
fi
integration-tests:
needs: check-publish
if: needs.check-publish.outputs.publish == 'true'
uses: ./.github/workflows/integration-tests.yml
test-api-e2e:
needs: check-publish
if: needs.check-publish.outputs.publish == 'true'
uses: ./.github/workflows/test-api-e2e.yml
secrets: inherit
test-api-e2e-mobile:
needs: check-publish
if: needs.check-publish.outputs.publish == 'true'
uses: ./.github/workflows/test-api-e2e-mobile.yml
version-or-publish:
needs:
- integration-tests
- test-api-e2e
- test-api-e2e-mobile
# the tests are skipped when covector only versions
if: ${{ !cancelled() && !failure() }}
runs-on: ubuntu-latest
timeout-minutes: 65
outputs: