This repository has been archived by the owner on Jul 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 122
126 lines (117 loc) · 3.67 KB
/
testing-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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
name: Testing Integration
on:
push:
branches:
- develop
- master
pull_request:
branches:
- develop
- master
paths:
- '**.php'
- '.github/workflows/*.yml'
- '!docs/**'
jobs:
continuous_integration:
runs-on: ubuntu-latest
strategy:
matrix:
php: [ '8.0', '7.4', '7.3' ]
wordpress: [ '6.0', '5.9', '5.8', '5.7.2', '5.6', '5.5.3' ]
include:
- php: '8.0'
wordpress: '5.7.2'
WPGRAPHQL_VERSION: 'v1.5.3'
- php: '7.4'
wordpress: '5.7.2'
coverage: 1
- php: '7.4'
wordpress: '5.7.2'
WPGRAPHQL_VERSION: 'v1.5.3'
- php: '7.4'
wordpress: '5.7.2'
WPGRAPHQL_VERSION: 'v1.3.5'
- php: '7.4'
wordpress: '5.7.2'
WPGRAPHQL_VERSION: 'v1.2.6'
- php: '7.4'
wordpress: '5.7.2'
WPGRAPHQL_VERSION: 'v1.1.8'
- php: '7.4'
wordpress: '5.7.2'
WPGRAPHQL_VERSION: 'v1.0.5'
- php: '7.4'
wordpress: '5.7.2'
WPGRAPHQL_VERSION: 'v0.15.5'
- php: '7.4'
wordpress: '5.7.2'
WPGRAPHQL_VERSION: 'v0.14.0'
- php: '7.4'
wordpress: '5.7.2'
WPGRAPHQL_VERSION: 'v0.13.3'
- php: '7.4'
wordpress: '5.7.2'
WPGRAPHQL_VERSION: 'v0.12.3'
- php: '7.4'
wordpress: '5.7.2'
WPGRAPHQL_VERSION: 'v0.11.0'
- php: '7.4'
wordpress: '5.7.2'
WPGRAPHQL_VERSION: 'v0.11.0'
- php: '7.4'
wordpress: '5.5.3'
- php: '7.3'
wordpress: '5.5.3'
exclude:
- php: '8.0'
wordpress: '5.5.3'
- php: '7.3'
wordpress: '6.0'
fail-fast: false
name: WordPress ${{ matrix.wordpress }} on PHP ${{ matrix.php }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
extensions: json, mbstring, zip, unzip
- name: Get Composer Cache Directory
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composercache.outputs.dir }}
key: php-${{ matrix.php }}-${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: php-${{ matrix.php }}-${{ runner.os }}-composer-
- name: Install dependencies
run: composer install
- name: Build container image
env:
PHP_VERSION: ${{ matrix.php }}
WP_VERSION: ${{ matrix.wordpress }}
run: |
docker-compose build \
--build-arg WP_VERSION=${{ matrix.wordpress }} \
--build-arg PHP_VERSION=${{ matrix.php }} \
--build-arg DOCKER_REGISTRY=ghcr.io/wp-graphql/
- name: Run Tests w/ Docker.
env:
COVERAGE: ${{ matrix.coverage }}
USING_XDEBUG: ${{ matrix.coverage }}
DEBUG: ${{ matrix.debug }}
SKIP_TESTS_CLEANUP: ${{ matrix.coverage }}
PHP_VERSION: ${{ matrix.php }}
WP_VERSION: ${{ matrix.wordpress }}
DOCKER_REGISTRY: ghcr.io/wp-graphql/
run: composer run-test
- name: Push Codecoverage to Coveralls.io
if: ${{ matrix.coverage == 1 }}
env:
COVERALLS_RUN_LOCALLY: 1
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: vendor/bin/php-coveralls -v