forked from php-opencloud/openstack
-
Notifications
You must be signed in to change notification settings - Fork 5
40 lines (38 loc) · 1.2 KB
/
unit_tests.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
name: Unit Tests
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
jobs:
tests:
runs-on: ubuntu-22.04
if: "!contains(github.event.head_commit.message, 'skip ci') && !contains(github.event.head_commit.message, 'ci skip')"
strategy:
fail-fast: false
matrix:
php: [ 7.2, 7.3, 7.4, 8.0, 8.1 ]
name: "php-${{ matrix.php }}"
steps:
- uses: actions/checkout@v2
- name: get cache directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v2
with:
path: |
~/.php_cs.cache
${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-cache-${{ matrix.php }}-${{ hashFiles('**.composer.lock') }}
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: curl
tools: composer:v2
coverage: none
- run: composer install --prefer-dist --no-interaction --no-progress
- run: vendor/bin/parallel-lint --exclude vendor .
- name: execute unit tests
run: vendor/bin/phpunit --configuration phpunit.xml.dist