-
Notifications
You must be signed in to change notification settings - Fork 1
97 lines (83 loc) · 2.94 KB
/
main-ci.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: CI
on:
pull_request:
branches: [main]
workflow_dispatch:
jobs:
generate_matrix:
name: Get changed packages
runs-on: ubuntu-latest
outputs:
packages: ${{ steps.changed_packages.outputs.packages }}
empty: ${{ steps.changed_packages.outputs.empty }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Find changed packages
id: changed_packages
uses: alexshukel/[email protected]
with:
filter: '@reactive-forms/*'
coverage:
name: Coverage report
needs: [generate_matrix]
if: ${{ !fromJson(needs.generate_matrix.outputs.empty) }}
runs-on: ubuntu-latest
strategy:
matrix:
package: ${{ fromJson(needs.generate_matrix.outputs.packages) }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Install pnpm 8.x.x
uses: pnpm/[email protected]
with:
version: 8.x.x
- uses: artiomtr/jest-coverage-report-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
test-script: pnpm run --prefix ../.. turbo run test --filter ${{ matrix.package.name }}
package-manager: pnpm
working-directory: ${{ matrix.package.path }}
size:
# TODO: configure Size limit for all packages
name: Size limit
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install pnpm 8.x.x
uses: pnpm/[email protected]
with:
version: 8.x.x
- name: Size limit
uses: andresz1/size-limit-action@dd31dce7dcc72a041fd3e49abf0502b13fc4ce05
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
package_manager: pnpm
build:
name: Build, lint, and test changed packages on Node 18
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install pnpm 8.x.x
uses: pnpm/[email protected]
with:
version: 8.x.x
- name: Install global dependencies
run: pnpm install
- name: Linting, testing & building changed packages
run: pnpm turbo run lint test build --filter=...[origin/${{ github.base_ref }}]