forked from workos/workos-php
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (44 loc) · 1.18 KB
/
ci.yml
File metadata and controls
51 lines (44 loc) · 1.18 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
name: CI
on:
push:
branches:
- "main"
pull_request: {}
defaults:
run:
shell: bash
jobs:
test:
name: Test PHP ${{ matrix.php }}
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: ["7.3", "7.4", "8.1", "8.2", "8.3"]
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # v2.32.0
with:
php-version: ${{ matrix.php }}
tools: "composer"
- name: Cache Composer packages
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-php-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php }}-
- name: Install dependencies
run: |
composer install --prefer-dist --no-progress --no-interaction
- name: Lint and formatting
if: >-
matrix.php == '7.4' ||
matrix.php == '8.1' ||
matrix.php == '8.2' ||
matrix.php == '8.3'
run: |
composer run-script format-check
- name: Test
run: |
composer run-script test