-
Notifications
You must be signed in to change notification settings - Fork 10
46 lines (38 loc) · 1.33 KB
/
build-and-test.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
name: Build and Test
on:
pull_request:
branches:
- next
jobs:
test_and_build:
runs-on: ubuntu-latest
env:
EXCLUDED_PACKAGE_OA_RENDERERS: '!./packages/vckit-oa-renderers/'
EXCLUDED_PACKAGE_CREDENTIAL_OA: '!./packages/credential-oa/'
EXCLUDED_PACKAGE_EXPLORER: '!./packages/demo-explorer/'
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Install pnpm
run: npm i pnpm --global
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: '21'
- name: Install dependencies
run: pnpm i --filter ${{ env.EXCLUDED_PACKAGE_OA_RENDERERS }} --filter ${{ env.EXCLUDED_PACKAGE_CREDENTIAL_OA }} --filter ${{ env.EXCLUDED_PACKAGE_EXPLORER }} --no-frozen-lockfile
- name: Build
run: pnpm build:agent
- name: Run tests
run: |
pnpm test:packages --changedSince=origin/next --ci --json --coverage --testLocationInResults --outputFile=report.json
- name: Coverage
uses: artiomtr/jest-coverage-report-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
coverage-file: report.json
base-coverage-file: report.json
threshold: 80