-
Notifications
You must be signed in to change notification settings - Fork 2
94 lines (92 loc) · 3.31 KB
/
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
name: CI on affected monorepo apps code
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
build:
name: Build affected apps
runs-on: ubuntu-latest
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
SENTRY_LOG_LEVEL: info
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/cache@v3
with:
path: |
**/node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-modules-
- uses: cachix/install-nix-action@v22
with:
github_access_token: ${{ secrets.BOT_GITHUB_PAT }}
- uses: cachix/cachix-action@v12
with:
name: hacksc
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v3
- run: nix develop --command yarn install --frozen-lockfile
- run: nix develop --command yarn nx run-many --target=install --parallel
- run: nix develop --command yarn nx affected:build --parallel --base=${{ env.NX_BASE }} --head=${{ env.NX_HEAD }}
test:
name: Test affected apps
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/cache@v3
with:
path: |
**/node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-modules-
- uses: cachix/install-nix-action@v22
with:
github_access_token: ${{ secrets.BOT_GITHUB_PAT }}
- uses: cachix/cachix-action@v12
with:
name: hacksc
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v3
- run: nix develop --command yarn install --frozen-lockfile
- run: nix develop --command yarn nx run-many --target=install --parallel
- run: nix develop --command yarn nx affected:test --parallel --base=${{ env.NX_BASE }} --head=${{ env.NX_HEAD }}
lint:
name: Lint affected apps
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/cache@v3
with:
path: |
**/node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-modules-
- uses: cachix/install-nix-action@v22
with:
github_access_token: ${{ secrets.BOT_GITHUB_PAT }}
- uses: cachix/cachix-action@v12
with:
name: hacksc
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v3
- run: nix develop --command yarn install --frozen-lockfile
- run: nix develop --command yarn nx run-many --target=install --parallel
- run: nix develop --command yarn nx affected:lint --parallel --base=${{ env.NX_BASE }} --head=${{ env.NX_HEAD }}