-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.38 KB
/
per-package-code-coverage.yml
File metadata and controls
47 lines (39 loc) · 1.38 KB
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
name: Per-Package Code Coverage
on:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
package-test-coverage:
name: Per-package code coverage
runs-on: ubuntu-latest
# Only run for the original repo, and only the default branch, and only if it's properly protected
if: |
(! github.event.push.head.repo.fork)
&& github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
&& github.ref_protected == true
strategy:
matrix:
package-name: [basic-library-template, react-library-template ]
steps:
- uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98
- uses: ./.github/reusable-workflows/setup-repo
with:
node-version: nvmrc
- name: Run package tests
run: |
cd packages/${{ matrix.package-name }}
pnpm exec turbo run test:ci
- name: Report package test coverage to coveralls.io
uses: coverallsapp/github-action@0a51d2e0b5417d06e4ecceb534aec87defc53926
with:
github-token: ${{ github.token }}
path-to-lcov: packages/${{ matrix.package-name }}/coverage/lcov.info
base-path: packages/${{ matrix.package-name }}
git-branch: x-cov-${{ matrix.package-name }}
fail-on-error: false