-
-
Notifications
You must be signed in to change notification settings - Fork 21
62 lines (54 loc) · 1.77 KB
/
php.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
name: Acquia PHP SDK v2 build and test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest, macos-latest]
php-versions: ['8.0', '8.1', '8.2']
coverage: ['none']
include:
# Only report coverage once
- operating-system: 'ubuntu-latest'
php-versions: '8.2'
coverage: 'pcov'
name: PHP ${{ matrix.php-versions }} build and test on ${{ matrix.operating-system }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: ${{ matrix.coverage }}
- name: Validate composer.json and composer.lock
run: composer validate
- name: Install dependencies
run: composer install --no-progress --no-interaction
- name: Run test suite
run: composer run-script test
- name: Upload coverage to Codecov
if: matrix.coverage == 'pcov'
uses: codecov/codecov-action@v3
with:
file: ./tests/logs/clover.xml
name: acquia-php-sdk-v2-codecov
# todo: set to true when codecov is more reliable
fail_ci_if_error: false
# Require all checks to pass without having to enumerate them in the branch protection UI.
# @see https://github.community/t/is-it-possible-to-require-all-github-actions-tasks-to-pass-without-enumerating-them/117957
check:
if: always()
needs:
- run
runs-on: ubuntu-22.04
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}