-
Notifications
You must be signed in to change notification settings - Fork 135
34 lines (32 loc) · 1.4 KB
/
test-plugin.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
name: Test Plugin
on:
pull_request:
paths-ignore:
- '**/*.md'
jobs:
test_plugin:
name: WordPress ${{ matrix.wordpress }}
runs-on: ubuntu-22.04
strategy:
matrix:
wordpress: ['6.3', '6.4']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create Docker Containers
working-directory: ./plugins/faustwp
run: docker-compose up -d
- name: Sleep 15 seconds
run: sleep 15
- name: Setup testing framework
working-directory: ./plugins/faustwp
run: docker exec -e COVERAGE=1 -e WP_VERSION=${{ matrix.wordpress}} $(docker-compose ps -q wordpress) init-testing-environment.sh
- name: Install and activate WP GraphQL
working-directory: ./plugins/faustwp
run: docker exec --workdir=/var/www/html/wp-content/plugins/faustwp $(docker-compose ps -q wordpress) wp plugin install wp-graphql --activate --allow-root
- name: Install Dependencies
working-directory: ./plugins/faustwp
run: docker exec -e COVERAGE=1 -e WP_VERSION=${{ matrix.wordpress}} -w /var/www/html/wp-content/plugins/faustwp $(docker-compose ps -q wordpress) composer install
- name: Run unit tests
working-directory: ./plugins/faustwp
run: docker exec -e COVERAGE=1 -e WP_VERSION=${{ matrix.wordpress}} -w /var/www/html/wp-content/plugins/faustwp $(docker-compose ps -q wordpress) composer test