-
Notifications
You must be signed in to change notification settings - Fork 52
58 lines (56 loc) · 1.53 KB
/
ci-cd.yaml
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
---
name: PHP CI/CD
on: [push, pull_request]
permissions: {}
jobs:
Unit_tests:
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
php-version: [
"5.4",
"5.6",
"7.4",
"8.0",
"8.2",
]
os: [ubuntu-latest, macOS-latest, windows-latest]
steps:
- uses: shivammathur/[email protected]
with:
php-version: ${{ matrix.php-version }}
tools: composer:v2
- uses: actions/checkout@v3
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Install Dependencies
run: composer install --no-ansi --no-interaction --no-progress
- name: Run test suite
run: vendor/bin/phpunit
Integration_tests:
if: github.event_name == 'push'
runs-on: ${{ matrix.os }}
timeout-minutes: 10
needs: Unit_tests
strategy:
fail-fast: false
matrix:
php-version: [
"7.4",
"8.2",
]
os: [ubuntu-latest, macOS-latest, windows-latest]
steps:
- uses: shivammathur/[email protected]
with:
php-version: ${{ matrix.php-version }}
tools: composer:v2
- uses: actions/checkout@v3
- name: Install Dependencies
run: composer install --no-ansi --no-interaction --no-progress
- name: Run test suite
env:
TINIFY_KEY: ${{ secrets.TINIFY_KEY }}
run: vendor/bin/phpunit --no-configuration test/integration.php