Skip to content

Commit d7d3380

Browse files
authored
ci: fix tests workflow
1 parent 030f8e4 commit d7d3380

File tree

1 file changed

+38
-15
lines changed

1 file changed

+38
-15
lines changed

.github/workflows/tests.yml

Lines changed: 38 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,47 @@ name: Tests
22

33
on:
44
push:
5-
branches: [ "dev", "master" ]
5+
branches:
6+
- main
67
pull_request:
7-
branches: [ "dev" ]
8+
branches:
9+
- main
10+
schedule:
11+
- cron: '3 0 * * *'
12+
13+
permissions:
14+
contents: read
815

916
jobs:
1017
tests:
1118
runs-on: ubuntu-latest
19+
20+
strategy:
21+
fail-fast: true
22+
matrix:
23+
php: [8.2, 8.3, 8.4]
24+
25+
name: PHP ${{ matrix.php }}
26+
1227
steps:
13-
- name: Setup PHP
14-
uses: shivammathur/setup-php@v2
15-
with:
16-
php-version: '8.2'
17-
- uses: actions/checkout@v4
18-
- name: Copy testing .env
19-
run: cp .env.testing .env
20-
- name: Install dependencies
21-
run: composer install --no-interaction
22-
- name: Generate key
23-
run: php artisan key:generate
24-
- name: Run tests
25-
run: php artisan test
28+
- name: Checkout code
29+
uses: actions/checkout@v4
30+
31+
- name: Setup PHP
32+
uses: shivammathur/setup-php@v2
33+
with:
34+
php-version: ${{ matrix.php }}
35+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite
36+
coverage: none
37+
38+
- name: Copy testing .env
39+
run: cp .env.testing .env
40+
41+
- name: Install dependencies
42+
run: composer install --no-interaction --no-progress
43+
44+
- name: Generate app key
45+
run: php artisan key:generate
46+
47+
- name: Run tests
48+
run: php artisan test

0 commit comments

Comments
 (0)