Skip to content

Commit d24593e

Browse files
authored
Merge pull request forcedotcom#157 from forcedotcom/uploadCoverage
chore: use c8 for code coverage
2 parents 750de98 + 762c509 commit d24593e

File tree

5 files changed

+1113
-1046
lines changed

5 files changed

+1113
-1046
lines changed

.github/workflows/run-tests.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ jobs:
1616
- run: yarn install
1717
- run: yarn test
1818
- name: Upload coverage to Codecov
19-
uses: codecov/codecov-action@v3
19+
uses: codecov/codecov-action@v4
2020
with:
21-
files: reports/coverage/*.json
21+
token: ${{ secrets.CODECOV_TOKEN }}
22+
files: coverage/*.json
2223
flags: frontend,backend
2324
run-tests-win:
2425
runs-on: windows-latest

.nycrc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
{
2-
"check-coverage": true,
3-
"lines": 75,
4-
"statements": 75,
5-
"functions": 75,
6-
"branches": 75
2+
"check-coverage": true,
3+
"lines": 75,
4+
"statements": 80,
5+
"functions": 75,
6+
"branches": 75,
7+
"temp-directory": "coverage",
8+
"reporter": ["text", "html"]
79
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
"@salesforce/ts-sinon": "1.4.30",
5353
"@types/node": "^22.10.3",
5454
"@types/node-forge": "^1.3.11",
55+
"c8": "^10.1.3",
5556
"eslint": "^8.57.1",
5657
"eslint-plugin-sf-plugin": "^1.20.13",
5758
"oclif": "^4.17.7",
@@ -128,7 +129,7 @@
128129
"postpack": "shx rm -f oclif.manifest.json oclif.lock",
129130
"prepack": "yarn clean-all && npm run sf-prepack",
130131
"sf-prepack": "sf-prepack",
131-
"test": "wireit",
132+
"test": "c8 mocha 'test/unit/**/*.test.ts'",
132133
"test:nuts": "nyc mocha \"**/*.nut.ts\" --slow 4500 --timeout 600000 --parallel",
133134
"test:only": "wireit",
134135
"version": "oclif readme"

tsconfig.json

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
{
2-
"extends": "@salesforce/dev-config/tsconfig-strict-esm",
3-
"compilerOptions": {
4-
"outDir": "dist",
5-
"rootDir": "src",
6-
"resolveJsonModule": true,
7-
"skipLibCheck": true,
8-
"baseUrl": ".",
9-
"experimentalDecorators": true,
10-
"pretty": true,
11-
"declarationMap": true,
12-
"removeComments": true
13-
},
14-
"include": [
15-
"./src/**/*.ts"
16-
]
17-
}
2+
"extends": "@salesforce/dev-config/tsconfig-strict-esm",
3+
"compilerOptions": {
4+
"outDir": "dist",
5+
"rootDir": "src",
6+
"resolveJsonModule": true,
7+
"skipLibCheck": true,
8+
"baseUrl": ".",
9+
"experimentalDecorators": true,
10+
"pretty": true,
11+
"declarationMap": true,
12+
"removeComments": true
13+
},
14+
"include": ["./src/**/*.ts"]
15+
}

0 commit comments

Comments
 (0)