-
-
Notifications
You must be signed in to change notification settings - Fork 2
81 lines (71 loc) · 2.18 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: "Run Tests"
on:
push:
branches:
- master
path:
- 'src/**'
- 'tests/**'
pull_request:
branches:
- master
paths:
- 'src/**'
- 'tests/**'
env:
XDEBUG_MODE: "coverage"
GITHUB_WORKSPACE: /var/www/html
jobs:
testing:
runs-on: ubuntu-latest
strategy:
matrix:
operating-system: ['ubuntu-latest']
php-versions: ['8.1', '8.2', '8.3']
phpts: [true, false]
env:
extensions: mbstring, intl, sodium, xsl, zip, pdo, pdo_sqlite, xdebug, curl, igbinary, msgpack
key: extensions-cache
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Cache Vendor
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-vendor-${{ hashFiles('**/composer.lock') }}
- name: Setup cache environment
id: extcache
uses: shivammathur/cache-extensions@v1
with:
php-version: ${{ matrix.php-versions }}
extensions: ${{ env.extensions }}
key: ${{ env.key }}
- name: Cache extensions
uses: actions/cache@v3
with:
path: ${{ steps.extcache.outputs.dir }}
key: ${{ steps.extcache.outputs.key }}-${{ env.phpts }}
restore-keys: ${{ steps.extcache.outputs.key }}-${{ env.phpts }}
- name: Setup PHP
id: setup-php
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
phpts: ${{ matrix.phpts }}
extensions: ${{ env.extensions }}
tools: php-cs-fixer, phpcs, composer
update: true
coverage: xdebug
- name: Composer install
run: composer install -q --no-ansi --prefer-dist --no-interaction --no-progress
- name: Run Tests
run: vendor/bin/pest --coverage-clover=coverage.xml --coverage --colors=always --fail-on-risky --fail-on-warning --fail-on-deprecation --strict-coverage
- uses: codecov/codecov-action@v4.0.1
with:
file: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
slug: dmalusev/laravel-crypto
name: laravel-crypto
fail_ci_if_error: false