-
Notifications
You must be signed in to change notification settings - Fork 2
39 lines (37 loc) · 1.01 KB
/
coverage.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: code coverage
on:
push:
branches:
- master
pull_request_target:
branches:
- master
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- name: enable corepack
run: corepack enable
- name: checkout
uses: actions/checkout@v4
- name: use node lts
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: pnpm
- name: install code climate reporter
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > /tmp/cc-test-reporter
chmod +x /tmp/cc-test-reporter
- name: install dependencies
run: pnpm install
- name: run coverage
run: pnpm run coverage
env:
CI: true
- name: upload coverage
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
run: |
/tmp/cc-test-reporter format-coverage -t lcov ./coverage/lcov.info
/tmp/cc-test-reporter upload-coverage