Added codecov.io coverage uploader to CI

refs https://linear.app/tryghost/issue/CORE-74/improve-the-test-situation

- this commit adds the codecov GitHub Action into CI so we can upload
  coverage reports
- the coverage files need to be in XML for them to work with
  codecov, so this commit also adds cobertura (XML) as a reporter
This commit is contained in:
Daniel Lockyer 2021-10-20 14:33:31 +02:00
parent 106f26eece
commit 73f21a5065
3 changed files with 3 additions and 3 deletions

View File

@ -7,7 +7,7 @@
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"dev": "echo \"Implement me!\"", "dev": "echo \"Implement me!\"",
"test": "NODE_ENV=testing c8 --check-coverage mocha './test/**/*.test.js'", "test": "NODE_ENV=testing c8 --reporter text --reporter cobertura --check-coverage mocha './test/**/*.test.js'",
"lint": "eslint . --ext .js --cache", "lint": "eslint . --ext .js --cache",
"posttest": "yarn lint" "posttest": "yarn lint"
}, },

View File

@ -7,7 +7,7 @@
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"dev": "echo \"Implement me!\"", "dev": "echo \"Implement me!\"",
"test": "NODE_ENV=testing mocha './test/**/*.test.js'", "test": "NODE_ENV=testing c8 --reporter text --reporter cobertura --check-coverage mocha './test/**/*.test.js'",
"lint": "eslint . --ext .js --cache", "lint": "eslint . --ext .js --cache",
"posttest": "yarn lint" "posttest": "yarn lint"
}, },

View File

@ -7,7 +7,7 @@
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"dev": "echo \"Implement me!\"", "dev": "echo \"Implement me!\"",
"test": "NODE_ENV=testing mocha './test/**/*.test.js'", "test": "NODE_ENV=testing c8 --reporter text --reporter cobertura mocha './test/**/*.test.js'",
"lint": "eslint . --ext .js --cache", "lint": "eslint . --ext .js --cache",
"posttest": "yarn lint" "posttest": "yarn lint"
}, },