Skip to content

Commit 2d6db11

Browse files
authored
Merge pull request #26 from Katka92/codecov_push_after_merge
Fix Codecov reports
2 parents cbd988f + ac894ab commit 2d6db11

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/post-merge.yaml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Push Coverage Post Merge
2+
3+
# Controls when the action will run.
4+
on:
5+
# Triggers the workflow on pull request events but only for the main branch
6+
push:
7+
branches:
8+
- main
9+
10+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
11+
jobs:
12+
# This workflow contains a single job called "test"
13+
test:
14+
# The type of runner that the job will run on
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
matrix:
19+
node-version: [20.x] # can support multiple versions ex: [18.x, 20.x]
20+
21+
steps:
22+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
23+
- name: Checkout 🛎️
24+
uses: actions/checkout@v4
25+
- name: Setup ⚙️ Node.js ${{ matrix.node-version }} 🔰
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: ${{ matrix.node-version }}
29+
cache: 'yarn'
30+
31+
- name: Install Dependencies 🥁
32+
run: yarn install --frozen-lockfile
33+
34+
- name: Run unit tests 🧪
35+
run: yarn coverage --silent --ci --verbose=false
36+
env:
37+
CI: true
38+
39+
- name: Upload coverage to Codecov
40+
uses: codecov/codecov-action@v4
41+
with:
42+
file: ./coverage/lcov.info
43+
token: ${{ secrets.CODECOV_TOKEN }}
44+
flags: unittests
45+
fail_ci_if_error: true

0 commit comments

Comments
 (0)