-
Notifications
You must be signed in to change notification settings - Fork 1
105 lines (89 loc) · 3.25 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
98
99
100
101
102
103
104
105
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@v4
# with:
# fetch-depth: 0
# - name: Use Node 20.x
# uses: actions/setup-node@v4
# with:
# node-version: 20.x
# - name: Install pnpm 9.12.3
# uses: pnpm/action-setup@v4
# with:
# version: 9.12.3
# - 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: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node 20
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install pnpm 9.12.3
uses: pnpm/action-setup@v4
with:
version: 9.12.3
- name: Install dependencies (with cache)
uses: covbot/pnpm-install-with-cache@v1
- 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 20
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node 20
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install pnpm 9.12.3
uses: pnpm/action-setup@v4
with:
version: 9.12.3
- name: Install dependencies (with cache)
uses: covbot/pnpm-install-with-cache@v1
- name: Linting, testing & building changed packages
run: pnpm turbo run lint test build --filter=...[origin/${{ github.base_ref }}]