Skip to content

Commit cc6c575

Browse files
committed
ci: setup GitHub actions
1 parent 32c772d commit cc6c575

File tree

1 file changed

+100
-0
lines changed

1 file changed

+100
-0
lines changed

Diff for: .github/workflows/ci.yml

+100
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request: {}
8+
9+
permissions:
10+
actions: read
11+
contents: read
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
install:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
- uses: actions/setup-node@v4
25+
with:
26+
node-version-file: .nvmrc
27+
cache: 'yarn'
28+
cache-dependency-path: 'yarn.lock'
29+
- run: yarn --frozen-lockfile --non-interactive
30+
31+
lint-affected:
32+
runs-on: ubuntu-latest
33+
needs: install
34+
steps:
35+
- uses: actions/checkout@v4
36+
- uses: actions/setup-node@v4
37+
with:
38+
node-version-file: .nvmrc
39+
cache: 'yarn'
40+
cache-dependency-path: 'yarn.lock'
41+
- run: yarn --frozen-lockfile --non-interactive
42+
- uses: nrwl/nx-set-shas@v4
43+
- run: yarn nx affected -t lint
44+
45+
test-affected:
46+
runs-on: ubuntu-latest
47+
needs: install
48+
steps:
49+
- uses: actions/checkout@v4
50+
- uses: actions/setup-node@v4
51+
with:
52+
node-version-file: .nvmrc
53+
cache: 'yarn'
54+
cache-dependency-path: 'yarn.lock'
55+
- run: yarn --frozen-lockfile --non-interactive
56+
- uses: nrwl/nx-set-shas@v4
57+
- run: yarn nx affected -t test
58+
59+
e2e-affected:
60+
runs-on: ubuntu-latest
61+
needs: install
62+
steps:
63+
- uses: actions/checkout@v4
64+
- uses: actions/setup-node@v4
65+
with:
66+
node-version-file: .nvmrc
67+
cache: 'yarn'
68+
cache-dependency-path: 'yarn.lock'
69+
- run: yarn --frozen-lockfile --non-interactive
70+
- uses: nrwl/nx-set-shas@v4
71+
- run: yarn nx affected -t e2e --exclude=docs-app
72+
73+
build-affected:
74+
runs-on: ubuntu-latest
75+
needs: install
76+
steps:
77+
- uses: actions/checkout@v4
78+
- uses: actions/setup-node@v4
79+
with:
80+
node-version-file: .nvmrc
81+
cache: 'yarn'
82+
cache-dependency-path: 'yarn.lock'
83+
- run: yarn --frozen-lockfile --non-interactive
84+
- uses: nrwl/nx-set-shas@v4
85+
- run: yarn nx build -t test
86+
87+
schematics-core-check:
88+
runs-on: ubuntu-latest
89+
needs: install
90+
steps:
91+
- uses: actions/checkout@v4
92+
- uses: actions/setup-node@v4
93+
with:
94+
node-version-file: .nvmrc
95+
cache: 'yarn'
96+
cache-dependency-path: 'yarn.lock'
97+
- run: yarn --frozen-lockfile --non-interactive
98+
- uses: nrwl/nx-set-shas@v4
99+
- run: yarn copy:schematics
100+
- run: yarn schematics:check

0 commit comments

Comments
 (0)