2
1
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2023-12-13 21:00:40 +01:00

Configured CI to only calculate coverage for recommended Node version

- we seem to be getting some odd numbers when running c8 on Node 12, and
  it's causing our CI checks to fail
- even when we're adding tests, the coverage value goes down
- this is disrupting the team from shipping, so we need to change that
- this commit alters the setup to run unit tests w/ c8 for Node 16 unit
  tests, and without c8 for other versions
- `yarn test:unit` is kept the same for everyday use
This commit is contained in:
Daniel Lockyer 2022-03-07 13:38:45 +00:00
parent cff033bb47
commit a7074592c8
2 changed files with 7 additions and 1 deletions

View file

@ -111,7 +111,12 @@ jobs:
cache: yarn
- run: yarn
- run: yarn test:unit
if: matrix.node == '16.13.0'
- run: yarn test:unit:base
if: matrix.node != '16.13.0'
- uses: codecov/codecov-action@v2

View file

@ -29,7 +29,8 @@
"test": "mocha --require=./test/utils/overrides.js --exit --trace-warnings --recursive --extension=test.js --timeout=60000",
"test:all": "yarn test:unit && yarn test:integration && yarn test:e2e && yarn lint",
"test:debug": "DEBUG=ghost:test* yarn test",
"test:unit": "c8 mocha --require=./test/utils/overrides.js --exit --trace-warnings --recursive --extension=test.js './test/unit' --timeout=2000",
"test:unit": "c8 yarn test:unit:base",
"test:unit:base": "mocha --require=./test/utils/overrides.js --exit --trace-warnings --recursive --extension=test.js './test/unit' --timeout=2000",
"test:integration": "mocha --require=./test/utils/overrides.js --exit --trace-warnings --recursive --extension=test.js './test/integration' --timeout=5000",
"test:e2e": "mocha --require=./test/utils/overrides.js --exit --trace-warnings --recursive --extension=test.js './test/e2e-api' './test/e2e-frontend' './test/e2e-server' --timeout=10000",
"test:regression": "mocha --require=./test/utils/overrides.js --exit --trace-warnings --recursive --extension=test.js './test/regression' --timeout=60000",