24
24
CHROMEDRIVER_CDNURL : https://googlechromelabs.github.io/
25
25
CHROMEDRIVER_CDNBINARIESURL : https://storage.googleapis.com/chrome-for-testing-public
26
26
CHROME_VALIDATED_VERSION : linux-120.0.6099.71
27
+ artifactRetentionDays : 14
27
28
# Bump Node memory limit
28
29
NODE_OPTIONS : " --max_old_space_size=4096"
29
30
30
31
jobs :
32
+ build :
33
+ name : Build the SDK
34
+ runs-on : ubuntu-latest
35
+ steps :
36
+ # Install Chrome so the correct version of webdriver can be installed by chromedriver when
37
+ # setting up the repo. This must be done to build and execute Auth properly.
38
+ - name : install Chrome stable
39
+ run : |
40
+ npx @puppeteer/browsers install chrome@stable
41
+ - uses : actions/checkout@v3
42
+ - name : Set up Node (20)
43
+ uses : actions/setup-node@v3
44
+ with :
45
+ node-version : 22.10.0
46
+ - name : Test setup and yarn install
47
+ run : |
48
+ cp config/ci.config.json config/project.json
49
+ yarn
50
+ - name : yarn build:changed auth
51
+ run : yarn build:changed auth
52
+ - name : Archive build
53
+ if : ${{ !cancelled() }}
54
+ run : |
55
+ tar -cf build.tar --exclude=.git .
56
+ gzip build.tar
57
+ - name : Upload build archive
58
+ if : ${{ !cancelled() }}
59
+ uses : actions/upload-artifact@v3
60
+ with :
61
+ name : build.tar.gz
62
+ path : build.tar.gz
63
+ retention-days : ${{ env.artifactRetentionDays }}
64
+
31
65
test-chrome :
32
66
name : Test Auth on Chrome and Node If Changed
33
67
runs-on : ubuntu-latest
56
90
with :
57
91
# This makes Actions fetch all Git history so run-changed script can diff properly.
58
92
fetch-depth : 0
93
+ - name : Download build archive
94
+ uses : actions/download-artifact@v3
95
+ with :
96
+ name : build.tar.gz
97
+ - name : Unzip build artifact
98
+ run : tar xf build.tar.gz
59
99
- name : Set up Node (20)
60
100
uses : actions/setup-node@v3
61
101
with :
64
104
run : |
65
105
cp config/ci.config.json config/project.json
66
106
yarn
67
- - name : build
68
- run : yarn build:changed auth
69
107
- name : Run tests on changed packages
70
108
run : xvfb-run yarn test:changed auth
71
109
test-firefox :
@@ -96,8 +134,12 @@ jobs:
96
134
run : |
97
135
cp config/ci.config.json config/project.json
98
136
yarn
99
- - name : build
100
- run : yarn build:changed auth
137
+ - name : Download build archive
138
+ uses : actions/download-artifact@v3
139
+ with :
140
+ name : build.tar.gz
141
+ - name : Unzip build artifact
142
+ run : tar xf build.tar.gz
101
143
- name : Run tests on auth changed packages
102
144
run : xvfb-run yarn test:changed auth
103
145
env :
@@ -121,8 +163,12 @@ jobs:
121
163
cp config/ci.config.json config/project.json
122
164
yarn
123
165
npx playwright install webkit
124
- - name : build
125
- run : yarn build:changed auth
166
+ - name : Download build archive
167
+ uses : actions/download-artifact@v3
168
+ with :
169
+ name : build.tar.gz
170
+ - name : Unzip build artifact
171
+ run : tar xf build.tar.gz
126
172
- name : Run tests on changed packages
127
173
run : yarn test:changed auth
128
174
env :
0 commit comments