-
Notifications
You must be signed in to change notification settings - Fork 17
54 lines (44 loc) · 1.49 KB
/
devenv-e2e.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
name: E2E Tests for Dev Env
on:
push:
workflow_dispatch:
permissions:
contents: read
env:
DO_NOT_TRACK: '1'
jobs:
test:
name: Run E2E Tests, shard ${{ matrix.shard }}
strategy:
fail-fast: false
matrix:
shard:
- 1
- 2
- 3
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js environment
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: npm
cache-dependency-path: npm-shrinkwrap.json
- name: Install dependencies
run: npm ci
- name: Pack and install
run: npm pack && npm i -g *.tgz
- name: Install docker-compose
run: |
REPO="docker/compose"
LATEST_RELEASE=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" --silent "https://api.github.com/repos/${REPO}/releases/latest" | jq -r .tag_name)
sudo curl -L "https://github.com/${REPO}/releases/download/${LATEST_RELEASE}/docker-compose-linux-x86_64" -o /usr/local/bin/docker-compose && sudo chmod 0755 /usr/local/bin/docker-compose
- name: Preload Docker images
run: |
vip dev-env create --app-code image --php 8.2 --mu-plugins image -e false -p true --mailpit true --photon true && \
vip dev-env start -w && \
vip dev-env destroy
- name: Run tests
run: npm run test:e2e:dev-env -- --shard=${{ matrix.shard }}/${{ strategy.job-total }}