-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (36 loc) · 1.39 KB
/
e2e-tests.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
name: E2E Tests
on:
workflow_dispatch:
pull_request:
jobs:
e2e-tests:
strategy:
fail-fast: false
matrix:
wp-docker-image-tag: ['6.6.1-php8.3', '6.4.2-php8.2']
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Setup test environment
run: |
export "WP_DOCKER_IMAGE_TAG=${{ matrix.wp-docker-image-tag }}"
docker compose up -d wordpress
docker compose run --rm -u 33 wpcli wp core install \
--url=localhost:9992 \
--title="Test Site" \
--admin_user=e2e \
--admin_password=e2e \
docker compose run --rm -u 33 wpcli wp plugin install gatherpress
docker compose run --rm e2e npm install
- name: Run the tests
run: docker compose run --rm e2e npm run test
- name: Retain failed test results
uses: actions/upload-artifact@v3
if: failure()
with:
name: test-results-${{ matrix.wp-docker-image-tag }}
path: test-results/
- name: Cleanup test environment
if: always()
run: docker compose down -v --remove-orphans