Skip to content

Commit d3844c7

Browse files
committed
[Build] Add automated tests using Github workflows
1 parent 7e3129b commit d3844c7

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/tests.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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']
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+
32+
- name: Set Laravel Version
33+
run: composer require "laravel/framework:${{ matrix.laravel }}" --no-update -n
34+
35+
- name: Install dependencies
36+
uses: nick-invision/retry@v1
37+
with:
38+
timeout_minutes: 5
39+
max_attempts: 5
40+
command: composer install --no-suggest --prefer-dist -n -o
41+
42+
- name: Execute tests
43+
run: vendor/bin/phpunit

0 commit comments

Comments
 (0)