-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (47 loc) · 1.19 KB
/
test.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
name: Test
on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
strategy:
matrix:
php-version:
- "7.2"
- "7.3"
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"
- "8.4"
steps:
- name: Dump matrix context
env:
MATRIX_CONTEXT: ${{ toJSON(matrix) }}
run: echo "$MATRIX_CONTEXT"
- name: Checkout
uses: actions/checkout@v2
- name: Build test image
if: matrix.php-version != '8.4'
run: docker build -t php-base --build-arg PHP_VERSION=$PHP_VERSION .
env:
PHP_VERSION: ${{ matrix.php-version }}
- name: Build test image
if: matrix.php-version == '8.4'
run: docker build -t php-base --build-arg PHP_VERSION=$PHP_VERSION .
env:
PHP_VERSION: '8.4.0alpha1'
- name: Output modules
run: docker run php-base php -m
- name: Check requirements
if: matrix.php-version != '8.4'
run: docker run -w "/test" -v $(pwd):/test php-base composer install