-
Notifications
You must be signed in to change notification settings - Fork 31
76 lines (61 loc) · 2.25 KB
/
Copy pathtest_legacy.yml
File metadata and controls
76 lines (61 loc) · 2.25 KB
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
name: Unit/Integration tests - Legacy
on:
pull_request:
workflow_dispatch:
# Cancel all previous workflow runs for the same branch that have not yet completed.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
run:
runs-on: ${{ matrix.operating-system }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest]
php-versions: ['7.4']
wp-versions: ['5.9']
name: WP ${{ matrix.wp-versions }} with PHP ${{ matrix.php-versions }}
services:
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping --silent"
--health-interval=10s
--health-timeout=5s
--health-retries=5
env:
IMAGIFY_TESTS_API_KEY: ${{ secrets.IMAGIFY_TESTS_API_KEY }}
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup PHP + Composer
uses: wp-media/workflows/.github/actions/setup-php-composer@main
with:
php-version: ${{ matrix.php-versions }}
# Empty overrides the action's `--no-scripts` default so Composer runs
# post-install/update scripts, i.e. Strauss namespace prefixing, which the
# integration tests need to autoload the Imagify\Dependencies\* classes.
composer-options: ''
- name: Setup WordPress test suite
uses: wp-media/workflows/.github/actions/setup-wp-tests@main
with:
wp-version: ${{ matrix.wp-versions }}
# Registered here, not in the composite action: GitHub removes problem
# matchers added inside a composite action when it finishes, so they must
# be added in the caller to stay active for the test steps below.
- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Unit tests
run: composer test-unit
- name: Integration tests
run: composer test-integration