-
Notifications
You must be signed in to change notification settings - Fork 6
65 lines (57 loc) · 1.84 KB
/
continous-integration.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
55
56
57
58
59
60
61
62
63
64
65
name: continuous_integration
on:
schedule:
- cron: '0 4 * * 5'
push:
branches:
- master
- develop
pull_request:
branches:
- develop
jobs:
continuous_integration:
runs-on: ubuntu-latest
strategy:
matrix:
php: [ '7.3', '7.4', '8.0' ]
fail-fast: false
name: Make sure that the WPGraphQLTestCase works!!!
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: json, mbstring
- name: Install PHPUnit dependencies
if: ${{ matrix.php != '8.0' }}
run: |
composer require wp-phpunit/wp-phpunit \
yoast/phpunit-polyfills \
phpunit/phpunit
composer install
- name: Run PHPUnit Tests w/ Docker.
if: ${{ matrix.php != '8.0' }}
run: composer run-phpunit -- -- --coverage-text
- name: Install Codeception dependencies
run: |
composer install --ignore-platform-reqs
composer require codeception/module-asserts:* \
codeception/util-universalframework:* \
codeception/module-rest:* \
lucatume/wp-browser:^3.1 --ignore-platform-reqs
- name: Run Codeception Tests w/ Docker.
run: composer run-codeception -- -- --coverage --coverage-xml
- name: Push Codecoverage to Coveralls.io
env:
COVERALLS_RUN_LOCALLY: 1
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
docker-compose run --rm \
--workdir=/var/www/html/wp-content/plugins/wp-graphql-testcase \
--user $(id -u) \
-e COVERALLS_RUN_LOCALLY=1 -e COVERALLS_REPO_TOKEN=$COVERALLS_REPO_TOKEN \
wordpress \
vendor/bin/php-coveralls -v