-
Notifications
You must be signed in to change notification settings - Fork 12
40 lines (40 loc) · 1.1 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
name: Tests
on:
workflow_dispatch:
push:
branches: [ v2-master ]
pull_request:
branches: [ v2-master ]
permissions:
contents: read
jobs:
test:
name: PHP ${{ matrix.php }}
runs-on: ubuntu-latest
if: "! contains(toJSON(github.event.head_commit.message), 'skip ci')"
strategy:
fail-fast: false
matrix:
php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- name: Cache Composer dependencies
id: cache
uses: actions/cache@v3
with:
path: ~/.composer/cache/files
key: unirest-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: unirest-php-${{ matrix.php }}-composer-
- name: Update dependencies
run: composer update
- name: Run lint
run: composer lint
- name: Run analyze
run: composer analyze
- name: Run tests
run: composer test-coverage-text