ci: add outputs and conditional step to TypeScript test workflow (#2541)
* feat: Add outputs to TypeScript test workflow The recent code changes added outputs to the TypeScript test workflow in order to capture the status of the tests. This will allow for better visibility and tracking of test failures. * chore: Add conditional step to merge-reports job in TypeScript test workflow
This commit is contained in:
parent
bfaac8b4ba
commit
71e3ed92d8
1 changed files with 14 additions and 0 deletions
14
.github/workflows/typescript_test.yml
vendored
14
.github/workflows/typescript_test.yml
vendored
|
|
@ -34,6 +34,8 @@ jobs:
|
|||
env:
|
||||
OPENAI_API_KEY: ${{ inputs.openai_api_key || secrets.OPENAI_API_KEY }}
|
||||
STORE_API_KEY: ${{ inputs.store_api_key || secrets.STORE_API_KEY }}
|
||||
outputs:
|
||||
failed: ${{ steps.check-failure.outputs.failed }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
|
@ -107,6 +109,15 @@ jobs:
|
|||
run: |
|
||||
cd src/frontend
|
||||
npx playwright test --trace on --shard ${{ matrix.shardIndex }}/${{ matrix.shardTotal }} --workers 2
|
||||
continue-on-error: true
|
||||
|
||||
# If the test fails, set a flag to indicate that the shard failed
|
||||
- name: Set failure flag
|
||||
id: check-failure
|
||||
if: failure()
|
||||
run: echo "failed=true" >> "$GITHUB_OUTPUT"
|
||||
|
||||
|
||||
|
||||
- name: Upload blob report to GitHub Actions Artifacts
|
||||
if: always()
|
||||
|
|
@ -116,9 +127,12 @@ jobs:
|
|||
path: src/frontend/blob-report
|
||||
retention-days: 1
|
||||
|
||||
|
||||
|
||||
merge-reports:
|
||||
needs: setup-and-test
|
||||
runs-on: ubuntu-latest
|
||||
if : ${{ needs.setup-and-test.outputs.failed != 'true' }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue