Skip to content

Commit 8fa47a1

Browse files
committed
test(ci): run tests in parallel
Signed-off-by: Adam Setch <adam.setch@outlook.com>
1 parent 7eee973 commit 8fa47a1

4 files changed

Lines changed: 9 additions & 5 deletions

File tree

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626

2727
- run: pnpm install
2828
- run: pnpm tsc --noEmit
29-
- run: pnpm test --verbose
29+
- run: pnpm test:coverage --verbose
3030

3131
- name: Archive code coverage results
3232
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@
1616
"sonarlint.connectedMode.project": {
1717
"connectionId": "gitify-app",
1818
"projectKey": "gitify-app_gitify"
19-
}
19+
},
20+
"jest.runMode": "on-save"
2021
}

jest.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const config: Config = {
55
globalSetup: '<rootDir>/src/renderer/__helpers__/jest.setup.env.ts',
66
setupFilesAfterEnv: ['<rootDir>/src/renderer/__helpers__/jest.setup.ts'],
77
testEnvironment: 'jsdom',
8-
collectCoverage: true,
8+
collectCoverage: false,
99
collectCoverageFrom: ['src/**/*', '!**/__snapshots__/**'],
1010
// Use ts-jest for TS/TSX and babel-jest only for plain JS/ESM (no JSX handled there)
1111
transform: {

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
"lint:check": "biome check",
2222
"lint": "biome check --fix",
2323
"test": "jest",
24+
"test:watch": "jest --watch",
25+
"test:changed": "jest --onlyChanged",
26+
"test:coverage": "jest --coverage",
2427
"start": "electron . --enable-logging",
2528
"prepare": "husky",
2629
"codegen": "graphql-codegen --config codegen.ts"
@@ -151,6 +154,6 @@
151154
},
152155
"lint-staged": {
153156
"*": "biome check --no-errors-on-unmatched",
154-
"*.{js,ts,tsx}": "pnpm test --findRelatedTests --passWithNoTests --updateSnapshot"
157+
"*.{js,ts,tsx}": "pnpm test --onlyChanged --passWithNoTests --updateSnapshot"
155158
}
156-
}
159+
}

0 commit comments

Comments
 (0)