Merge pull request #2155 from Automattic/release/patch--trunk--v3.9.3… #3254
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |