Skip to content

Commit be0c464

Browse files
author
bryanadamloh97
committed
Added CI test for package
1 parent 7fa313f commit be0c464

File tree

2 files changed

+41
-17
lines changed

2 files changed

+41
-17
lines changed

.github/workflows/ci-test.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: run-tests
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
run-tests:
8+
runs-on: ubuntu-latest
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
php: [7.2, 7.3, 7.4]
13+
laravel: [6.*, 7.*]
14+
15+
name: PHP${{ matrix.php }} - Laravel ${{ matrix.laravel }}
16+
17+
steps:
18+
- name: Update apt
19+
run: sudo apt-get update --fix-missing
20+
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+
coverage: none
29+
30+
- name: Setup Problem Matches
31+
run: |
32+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
33+
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
34+
35+
- name: Install dependencies
36+
run: |
37+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
38+
composer update --prefer-dist --no-interaction --no-suggest
39+
40+
- name: Execute tests
41+
run: vendor/bin/phpunit

.github/workflows/github-actions-demo.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)