Skip to content

Commit

Permalink
Use a different continue-on-error pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
compulim committed Dec 6, 2023
1 parent 65bede2 commit 01e46e8
Showing 1 changed file with 30 additions and 7 deletions.
37 changes: 30 additions & 7 deletions .github/workflows/pull-request-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,29 @@ jobs:

- run: npm run build --if-present

- continue-on-error: true
name: Run jest --testPathPattern packages/
- name: Run jest --testPathPattern packages/
run: ./node_modules/.bin/jest --testPathPattern packages/

- if: always()
name: Append ID to test result
run: |
ls -laR .
mv jest.json jest-unit.json
mv nunit3.xml nunit3-unit.xml
mv result.trx result-unit.trx
working-directory: ./coverage

- if: always()
name: Upload test results
uses: actions/upload-artifact@v3
with:
name: test-result
path: |
./coverage/jest-*.json
./coverage/nunit3-*.xml
./coverage/result-*.trx
html-test:
name: HTML test (${{ format('{0}/{1}', matrix.shard-index, matrix.shard-count) }})
needs:
Expand Down Expand Up @@ -144,8 +163,7 @@ jobs:
- name: Run docker-compose up
run: docker-compose -f docker-compose-wsl2.yml up --detach --scale chrome=2

- continue-on-error: true
name: Run jest --shard=${{ format('{0}/{1}', matrix.shard-index, matrix.shard-count) }}
- name: Run jest --shard=${{ format('{0}/{1}', matrix.shard-index, matrix.shard-count) }}
run: |
./node_modules/.bin/jest \
--bail=20 \
Expand All @@ -156,15 +174,18 @@ jobs:
--runInBand \
--shard=${{ format('{0}/{1}', matrix.shard-index, matrix.shard-count) }}
- run: |
- if: always()
name: Append ID to test result
run: |
ls -laR .
mv jest.json jest-${{ matrix.shard-index }}.json
mv nunit3.xml nunit3-${{ matrix.shard-index }}.xml
mv result.trx result-${{ matrix.shard-index }}.trx
working-directory: ./coverage

- name: Upload test results
- if: always()
name: Upload test results
uses: actions/upload-artifact@v3
with:
name: test-result
Expand All @@ -173,10 +194,12 @@ jobs:
./coverage/nunit3-*.xml
./coverage/result-*.trx
- name: Run docker-compose down
- if: always()
name: Run docker-compose down
run: docker-compose -f docker-compose-wsl2.yml down --rmi all

merge-test-result:
if: always()
name: Merge test result
needs:
- html-test
Expand Down

0 comments on commit 01e46e8

Please sign in to comment.