2828 env :
2929 TZ : " Europe/Prague"
3030
31+ prepare-e2e-server :
32+ runs-on : ubuntu-latest
33+ steps :
34+ - uses : actions/checkout@v6
35+
36+ - name : Cache base Docker images
37+ uses : actions/cache@v5
38+ with :
39+ path : /tmp/base-docker-images.tar
40+ key : base-docker-images-${{ hashFiles('e2e/server/docker-compose.yml') }}
41+ restore-keys : |
42+ base-docker-images-
43+
44+ - name : Load or pull base Docker images
45+ run : |
46+ if [ -f /tmp/base-docker-images.tar ]; then
47+ echo "Loading base images from cache"
48+ docker load -i /tmp/base-docker-images.tar
49+ else
50+ echo "Pulling base images and saving to cache"
51+ docker compose pull
52+ docker save \
53+ redis:alpine \
54+ mongo:6 \
55+ docker.elastic.co/elasticsearch/elasticsearch:7.17.22 \
56+ marlonb/mailcrab:latest \
57+ -o /tmp/base-docker-images.tar
58+ fi
59+ working-directory : e2e/server
60+
61+ - name : Build superdesk server
62+ run : docker compose build server
63+ working-directory : e2e/server
64+
65+ - name : Archive e2e server images
66+ run : |
67+ docker save \
68+ redis:alpine \
69+ mongo:6 \
70+ docker.elastic.co/elasticsearch/elasticsearch:7.17.22 \
71+ marlonb/mailcrab:latest \
72+ superdesk-client-core-e2e-server:ci | gzip > /tmp/e2e-server-images.tar.gz
73+
74+ - name : Upload e2e server images
75+ uses : actions/upload-artifact@v7
76+ with :
77+ name : e2e-server-images
78+ path : /tmp/e2e-server-images.tar.gz
79+ retention-days : 1
80+
81+ prepare-e2e-client :
82+ runs-on : ubuntu-latest
83+ env :
84+ # CI runs the e2e server on :5000 (docker-compose PORT default; no AirPlay
85+ # conflict on Linux). The test helpers and client build read SUPERDESK_URL,
86+ # which defaults to 5002 locally to dodge macOS AirPlay; pin it to the CI port.
87+ SUPERDESK_URL : http://localhost:5000/api
88+ strategy :
89+ fail-fast : false
90+ matrix :
91+ node-version : ['22', '24']
92+ steps :
93+ - uses : actions/checkout@v6
94+ - uses : actions/setup-node@v6
95+ with :
96+ node-version : ${{ matrix.node-version }}
97+ cache : ' npm'
98+ cache-dependency-path : |
99+ package-lock.json
100+ build-tools/package-lock.json
101+ e2e/client/package-lock.json
102+
103+ - run : npm ci
104+ - run : npm ci
105+ working-directory : build-tools
106+ - run : npm ci
107+ working-directory : e2e/client
108+ - run : npm run build
109+ working-directory : e2e/client
110+
111+ - name : Upload e2e client dist
112+ uses : actions/upload-artifact@v7
113+ with :
114+ name : e2e-client-dist-node-${{ matrix.node-version }}
115+ path : e2e/client/dist
116+ retention-days : 1
117+
31118 playwright-e2e :
32119 runs-on : ubuntu-latest
120+ needs :
121+ - prepare-e2e-server
122+ - prepare-e2e-client
33123 env :
34124 # CI runs the e2e server on :5000 (docker-compose PORT default; no AirPlay
35125 # conflict on Linux). The test helpers and client build read SUPERDESK_URL,
@@ -50,6 +140,22 @@ jobs:
50140 with :
51141 node-version : ${{ matrix.node-version }}
52142 cache : ' npm'
143+ cache-dependency-path : e2e/client/package-lock.json
144+
145+ - name : Download e2e client dist
146+ uses : actions/download-artifact@v8
147+ with :
148+ name : e2e-client-dist-node-${{ matrix.node-version }}
149+ path : e2e/client/dist
150+
151+ - name : Download e2e server images
152+ uses : actions/download-artifact@v8
153+ with :
154+ name : e2e-server-images
155+ path : /tmp/e2e-server-images
156+
157+ - name : Load e2e server images
158+ run : gunzip -c /tmp/e2e-server-images/e2e-server-images.tar.gz | docker load
53159
54160 - name : Setup E2E Environment
55161 uses : ./.github/actions/setup-e2e
88194 if : ${{ !cancelled() }}
89195 uses : actions/upload-artifact@v7
90196 with :
91- name : blob-report-${{ matrix.shardIndex }}
197+ name : blob-report-node-${{ matrix.node-version }}-shard- ${{ matrix.shardIndex }}
92198 path : e2e/client/blob-report
93199 retention-days : 1
94200
0 commit comments