Skip to content

Commit 0e6cf2f

Browse files
committed
ci(codeclimate): add codeclimate reporting back
This was missed when migrating from Travis to GitHub Actions
1 parent d4e09c9 commit 0e6cf2f

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

.github/workflows/jest.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,27 @@
11
name: Unit Tests
2+
23
on: [push, pull_request]
4+
35
jobs:
46
jest:
57
name: Jest (${{ matrix.node_version}}-${{ matrix.os }})
8+
69
runs-on: ${{ matrix.os }}
10+
711
strategy:
812
matrix:
913
node_version: [10, 12, 14]
1014
os: [ubuntu-latest, windows-latest, macos-latest]
15+
1116
steps:
1217
- name: Checkout repository
1318
uses: actions/checkout@v2
19+
1420
- name: Use node ${{ matrix.node_version }}
1521
uses: actions/setup-node@v1
1622
with:
1723
node-version: ${{ matrix.node_version }}
24+
1825
- name: Restore cache
1926
uses: actions/cache@v2
2027
with:
@@ -23,13 +30,29 @@ jobs:
2330
*/*/node_modules
2431
key: ${{ matrix.os }}-${{ matrix.node_version}}-yarn-${{ hashFiles('**/yarn.lock') }}
2532
restore-keys: ${{ matrix.os }}-${{ matrix.node_version }}-yarn-
33+
34+
- name: Install Code Climate test reporter
35+
uses: amancevice/setup-code-climate@v0
36+
with:
37+
cc_test_reporter_id: ${{ secrets.CC_TEST_REPORTER_ID }}
38+
2639
- name: Install yarn dependencies
2740
run: yarn install
41+
2842
- name: Bootstrap lerna packages
2943
run: yarn bootstrap
44+
45+
- name: Code Climate test reporter (before build)
46+
run: cc-test-reporter before-build
47+
3048
- name: Jest with code coverage
3149
if: matrix.node_version == 14 && matrix.os == 'ubuntu-latest'
3250
run: yarn test:coverage
51+
3352
- name: Jest
3453
if: matrix.node_version != 14 || matrix.os != 'ubuntu-latest'
3554
run: yarn jest
55+
56+
- name: Code Climate test reporter (after build)
57+
run: cc-test-reporter after-build
58+
if: ${{ github.event_name != 'pull_request' }}

0 commit comments

Comments
 (0)