@@ -8,7 +8,8 @@ permissions:
8
8
contents : read
9
9
pull-requests : read
10
10
jobs :
11
- build :
11
+ build-and-test :
12
+ name : build and test
12
13
runs-on : buildjet-4vcpu-ubuntu-2204
13
14
outputs :
14
15
cache-hit : ${{ steps.pnpm-cache.outputs.cache-hit }}
@@ -17,15 +18,10 @@ jobs:
17
18
steps :
18
19
- name : Checkout
19
20
uses : actions/checkout@v4
20
-
21
- - name : Enable Corepack
22
- id : pnpm-setup
23
- run : |
24
- corepack enable
25
- corepack prepare [email protected] --activate
26
- pnpm config set script-shell "/usr/bin/bash"
27
-
21
+ - name : pnpm setup
22
+ uses : pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda
28
23
- name : pnpm Cache
24
+ id : pnpm-cache
29
25
uses : buildjet/cache@3e70d19e31d6a8030aeddf6ed8dbe601f94d09f4
30
26
with :
31
27
path : |
35
31
key : ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
36
32
restore-keys : |
37
33
${{ runner.os }}-pnpm-
38
-
39
34
- name : Install packages
40
35
if : steps.pnpm-cache.outputs.cache-hit != 'true'
41
36
run : pnpm install --frozen-lockfile
42
-
43
37
- name : turborepo Cache
44
38
uses : buildjet/cache@3e70d19e31d6a8030aeddf6ed8dbe601f94d09f4
45
39
with :
@@ -48,54 +42,24 @@ jobs:
48
42
key : ${{ runner.os }}-turbo-${{ github.sha }}
49
43
restore-keys : |
50
44
${{ runner.os }}-turbo-
51
-
52
45
- name : Run Build
53
46
run : pnpm build
54
- test :
55
- runs-on : buildjet-4vcpu-ubuntu-2204
56
- needs : [build]
57
- container :
58
- image : node:22
59
- steps :
60
- - name : Checkout
61
- uses : actions/checkout@v4
62
-
63
- - name : Setup pnpm
64
- run : |
65
- corepack enable
66
- corepack prepare [email protected] --activate
67
-
68
- - name : Restore dependencies
69
- uses : buildjet/cache@3e70d19e31d6a8030aeddf6ed8dbe601f94d09f4
70
- with :
71
- path : |
72
- ~/.pnpm-store
73
- node_modules
74
- */*/node_modules
75
- key : ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
76
-
77
- - name : turborepo Cache
78
- uses : buildjet/cache@3e70d19e31d6a8030aeddf6ed8dbe601f94d09f4
79
- with :
80
- path : |
81
- .turbo
82
- key : ${{ runner.os }}-turbo-${{ github.sha }}
83
- restore-keys : |
84
- ${{ runner.os }}-turbo-
85
-
47
+ # We include the environment variables here so that the cache for turborepo
48
+ # is not invalidated and builds are re-ran
49
+ env :
50
+ SPAM_ASSASSIN_HOST : ${{ secrets.SPAM_ASSASSIN_HOST }}
51
+ SPAM_ASSASSIN_PORT : ${{ secrets.SPAM_ASSASSIN_PORT }}
86
52
- name : Run Tests
87
53
run : pnpm test
88
54
env :
89
55
SPAM_ASSASSIN_HOST : ${{ secrets.SPAM_ASSASSIN_HOST }}
90
56
SPAM_ASSASSIN_PORT : ${{ secrets.SPAM_ASSASSIN_PORT }}
91
-
92
57
dependencies :
93
58
runs-on : buildjet-4vcpu-ubuntu-2204
94
59
container :
95
60
image : node:22
96
61
steps :
97
62
- name : Checkout
98
63
uses : actions/checkout@v4
99
-
100
64
- name : Check for pinned dependencies
101
65
run : npx tsx ./scripts/check-dependency-versions.ts
0 commit comments