-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (59 loc) · 1.88 KB
/
coverage.yml
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Coverage
on:
push:
branches: [develop]
pull_request:
branches: [develop]
jobs:
analyze:
name: code-climate-reporter
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
pnpm-version: [8.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install lcov
run: sudo apt-get install -y lcov
- name: Intall pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ matrix.pnpm-version }}
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm i
env:
NODE_OPTIONS: '--max_old_space_size=6144'
# - name: Run tests
# run: pnpm test
- name: Test & publish code coverage
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CODECLIMATE_TOKEN }}
with:
coverageCommand: pnpm coverage:lcov
debug: true
coverageLocations: lcov.info:lcov
- name: Report results to DeepSource
env:
DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN }}
run: |
curl https://deepsource.io/cli | sh
./bin/deepsource report --analyzer test-coverage --key javascript --value-file ./lcov.info