-
Notifications
You must be signed in to change notification settings - Fork 56
71 lines (60 loc) · 2.07 KB
/
main_action.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
name: A1 Pdf Sign Tests
on:
push:
branches: [ main, dev, v1.x-dev ]
pull_request:
branches: [ main, dev, v1.x-dev ]
permissions:
contents: read
jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ ubuntu-latest ]
php-versions: [ '8.1', '8.2', '8.3' ]
laravel-version: [ '11.*','10.*','9.*' ]
env:
extensions: mbstring, dom, fileinfo, openssl, json, imagick, swoole, sqlite3
key: cache-v5
name: PHP ${{ matrix.php-versions }} - Laravel ${{ matrix.laravel-version }} - ${{ matrix.operating-system}}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup cache environment
id: cache-env
uses: shivammathur/cache-extensions@develop
with:
php-version: ${{ matrix.php-versions }}
extensions: ${{ env.extensions }}
key: ${{ env.key }}
- name: Cache extensions
uses: actions/cache@v4
with:
path: ${{ steps.cache-env.outputs.dir }}
key: ${{ steps.cache-env.outputs.key }}
restore-keys: ${{ steps.cache-env.outputs.key }}
- name: Setup PHP with latest versions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
env:
update: true
- name: Testing PHP version
run: |
php -v
php -r "if(strpos(phpversion(), '${{ matrix.php-versions }}') === false) {throw new Exception('Wrong PHP version Installed');}"
- name: Testing Composer version
run: |
composer -V
php -r "if(strpos(@exec('composer -V'), 'Composer version') === false) {throw new Exception('Composer not found');}"
- name: Validate composer.json and composer.lock
run: |
composer validate
- name: Install dependencies
run: |
composer update -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Execute tests
run: |
vendor/bin/testbench package:test