-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (56 loc) · 1.67 KB
/
build.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
name: Build
on:
push:
branches:
- main
paths:
- '.github/actions/build-setup/**/*'
- '.github/workflows/build.yml'
- 'packages/addons/src/**/*'
- 'packages/addons/test/**/*'
- 'packages/addons/*.js'
- 'packages/addons/**/*.json'
- 'packages/check-ts-support/src/**/*'
- 'packages/check-ts-support/**/*.json'
- '.nvmrc'
- 'package.json'
- 'package-lock.json'
pull_request:
branches:
- main
paths:
- '.github/actions/build-setup/**/*'
- '.github/workflows/build.yml'
- 'packages/addons/src/**/*'
- 'packages/addons/test/**/*'
- 'packages/addons/*.js'
- 'packages/addons/**/*.json'
- 'packages/check-ts-support/src/**/*'
- 'packages/check-ts-support/**/*.json'
- '.nvmrc'
- 'package.json'
- 'package-lock.json'
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Build Setup
uses: ./.github/actions/build-setup
- name: Build Library
run: npm run build -w packages/addons
- name: Test compilation
run: npm run test-check -w packages/addons
- name: Test
id: 'test'
run: npm test -w packages/addons -- --coverage
- name: Upload coverage report
if: ${{ steps.test.outcome == 'success' || steps.test.outcome == 'failure' }} # when tests have been run
uses: actions/upload-artifact@v4
with:
name: coverage-${{github.sha}}
path: packages/addons/coverage
- name: Check TypeScript Support
run: npm test -w packages/check-ts-support
- name: Check Lint
run: npm run lint-check