Skip to content

Commit 9b6ce25

Browse files
authored
tests on push to main for codecov (#3481)
1 parent c5e9883 commit 9b6ce25

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/main-test.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Main Tests
2+
# report coverage on main for codecov baseline
3+
on:
4+
push:
5+
branches: [main]
6+
jobs:
7+
install:
8+
name: Install
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout Code
13+
uses: actions/checkout@v3
14+
- uses: actions/setup-node@v3
15+
with:
16+
node-version: 16
17+
cache: yarn
18+
- name: Cache node modules
19+
id: cache-modules
20+
uses: actions/cache@v3
21+
with:
22+
path: |
23+
**/node_modules
24+
key: modules-${{ github.sha }}
25+
- uses: actions/cache@v3
26+
with:
27+
path: |
28+
~/.cache/Cypress
29+
key: cypress-${{ runner.os }}
30+
- run: yarn install --frozen-lockfile --immutable
31+
32+
jest:
33+
name: Jest Unit Tests
34+
runs-on: ubuntu-latest
35+
needs: [install]
36+
steps:
37+
- uses: actions/checkout@v3
38+
- uses: actions/setup-node@v3
39+
with:
40+
node-version: 16
41+
- id: cache-modules
42+
uses: actions/cache@v3
43+
with:
44+
path: |
45+
**/node_modules
46+
key: modules-${{ github.sha }}
47+
- run: yarn test --coverage
48+
- uses: codecov/codecov-action@v3
49+
with:
50+
token: ${{ secrets.CODECOV_TOKEN }}
51+
files: coverage/lcov.info
52+
fail_ci_if_error: true
53+
verbose: true
54+
55+

0 commit comments

Comments
 (0)