Skip to content

Commit 276be2e

Browse files
committed
[Build] Add automated tests with Github actions
1 parent 4537a43 commit 276be2e

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/tests.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main, develop ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
fail-fast: true
16+
matrix:
17+
php: ['7.4', '8.0', '8.1']
18+
laravel: ['^8.0']
19+
20+
steps:
21+
- name: Checkout Code
22+
uses: actions/checkout@v2
23+
24+
- name: Setup PHP
25+
uses: shivammathur/setup-php@v2
26+
with:
27+
php-version: ${{ matrix.php }}
28+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd
29+
tools: composer:v2
30+
coverage: none
31+
ini-values: error_reporting=E_ALL
32+
33+
- name: Set Laravel Version
34+
run: composer require "laravel/framework:${{ matrix.laravel }}" --no-update -n
35+
36+
- name: Install dependencies
37+
uses: nick-invision/retry@v1
38+
with:
39+
timeout_minutes: 5
40+
max_attempts: 5
41+
command: composer install --no-suggest --prefer-dist -n -o
42+
43+
- name: Execute tests
44+
run: vendor/bin/phpunit

0 commit comments

Comments
 (0)