@@ -38,125 +38,19 @@ env:
38
38
39
39
jobs :
40
40
typecheck :
41
- name : ʦ TypeScript
42
- runs-on : buildjet-4vcpu-ubuntu-2204
43
- steps :
44
- - name : ⬇️ Checkout repo
45
- uses : actions/checkout@v3
46
- with :
47
- fetch-depth : 0
41
+ uses : ./.github/workflows/typecheck.yml
42
+ secrets : inherit
48
43
49
- - name : ⎔ Setup pnpm
50
-
51
- with :
52
- version : 7.18
53
-
54
- - name : ⎔ Setup node
55
- uses : buildjet/setup-node@v3
56
- with :
57
- node-version : 18
58
- cache : " pnpm"
59
-
60
- - name : 📥 Download deps
61
- run : pnpm install --frozen-lockfile
62
-
63
- - name : 📀 Generate Prisma Client
64
- run : pnpm run generate
65
-
66
- - name : 🔎 Type check
67
- run : pnpm run typecheck --filter webapp
68
-
69
- unitTests :
70
- name : Unit Tests
71
- runs-on : buildjet-4vcpu-ubuntu-2204
72
- steps :
73
- - name : ⬇️ Checkout repo
74
- uses : actions/checkout@v3
75
- with :
76
- fetch-depth : 0
77
-
78
- - name : ⎔ Setup pnpm
79
-
80
- with :
81
- version : 7.18
82
-
83
- - name : ⎔ Setup node
84
- uses : buildjet/setup-node@v3
85
- with :
86
- node-version : 18
87
- cache : " pnpm"
88
-
89
- - name : 📥 Download deps
90
- run : pnpm install --frozen-lockfile
91
-
92
- - name : Run Unit Tests
93
- run : |
94
- pnpm run test
44
+ units :
45
+ uses : ./.github/workflows/unit-tests.yml
46
+ secrets : inherit
95
47
96
48
e2e :
97
- name : e2e Tests
98
- runs-on : buildjet-4vcpu-ubuntu-2204
99
- steps :
100
- - name : 🐳 Login to Docker Hub
101
- uses : docker/login-action@v2
102
- with :
103
- username : ${{ secrets.DOCKERHUB_USERNAME }}
104
- password : ${{ secrets.DOCKERHUB_TOKEN }}
105
-
106
- - name : ⬇️ Checkout repo
107
- uses : actions/checkout@v3
108
- with :
109
- fetch-depth : 0
110
-
111
- - name : ⎔ Setup pnpm
112
-
113
- with :
114
- version : 7.18
115
-
116
- - name : ⎔ Setup node
117
- uses : buildjet/setup-node@v3
118
- with :
119
- node-version : 18
120
- cache : " pnpm"
121
-
122
- - name : 📥 Download deps
123
- run : pnpm install --frozen-lockfile
124
-
125
- - name : Install Playwright Browsers
126
- run : npx playwright install --with-deps
127
-
128
- - name : Run Playwright tests
129
- run : |
130
- # Setup environment variables
131
- cp ./.env.example ./.env
132
- cp ./references/nextjs-test/.env.example ./references/nextjs-test/.env.local
133
-
134
- # Build packages
135
- pnpm run build --filter @references/nextjs-test^...
136
- pnpm --filter @trigger.dev/database generate
137
-
138
- # Move trigger-cli bin to correct place
139
- pnpm install --frozen-lockfile
140
-
141
- # Execute tests
142
- pnpm run docker
143
- pnpm run db:migrate
144
- pnpm run db:seed
145
- pnpm run test:e2e
146
-
147
- # Cleanup
148
- pnpm run docker:stop
149
-
150
- - name : Upload Playwright report
151
- uses : actions/upload-artifact@v3
152
- if : always()
153
- with :
154
- name : playwright-report
155
- path : playwright-report/
156
- retention-days : 30
49
+ uses : ./.github/workflows/e2e.yml
50
+ secrets : inherit
157
51
158
52
publish :
159
- needs : [typecheck, unitTests , e2e]
53
+ needs : [typecheck, units , e2e]
160
54
runs-on : buildjet-4vcpu-ubuntu-2204
161
55
outputs :
162
56
version : ${{ steps.get_version.outputs.version }}
0 commit comments