Skip to content

Commit

Permalink
Ensure CI detects failing tests
Browse files Browse the repository at this point in the history
There is currently a bug in the `ts-jest` project [1] which causes
compile failures to result in a masked failing exit code *if test
coverage is being generated*.

The best solution would be to patch upstream, but in lieu of that we are
going to just run tests twice: once without coverage and once with
coverage.

Issue #457 npm run test:ci prints failures but exits success

[1] kulshekhar/ts-jest#4193
  • Loading branch information
slifty committed Aug 25, 2023
1 parent 26d8b3c commit 2d435cb
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/test.yml
Expand Up @@ -36,7 +36,17 @@ jobs:
- name: Run build
run: npm run build

- name: Run all tests
- name: Run all tests (without coverage)
run: npm run test:ci -- --coverage=false
env:
PGHOST: localhost
PGPORT: 5432
PGUSER: postgres
PGPASSWORD: postgres
AUTH_SERVER_ISSUER: https://totally-fake-server-name/realms/pdc
OPENAPI_DOCS_AUTH_CLIENT_ID: pdc-fake-client-id

- name: Run all tests (with coverage)
run: npm run test:ci
env:
PGHOST: localhost
Expand Down

0 comments on commit 2d435cb

Please sign in to comment.