Skip to content

Commit 29f1b5a

Browse files
committed
Added Github action to run tests
1 parent 60ea5d1 commit 29f1b5a

File tree

3 files changed

+56
-3
lines changed

3 files changed

+56
-3
lines changed

.github/workflows/run-tests.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: run-tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
tests:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
os: [ubuntu-latest]
12+
php: [8.2,8.3,8.4]
13+
laravel: [11.*,12.*]
14+
stability: [ prefer-stable ]
15+
dependency-version: [ prefer-stable]
16+
include:
17+
- laravel: 11.*
18+
testbench: 9.*
19+
filament: 4.*
20+
- laravel: 12.*
21+
testbench: 10.*
22+
filament: 4.*
23+
24+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - - ${{ matrix.stability }} - ${{ matrix.dependency-version }}
25+
26+
steps:
27+
- name: Checkout code
28+
uses: actions/checkout@v4
29+
30+
- name: Install SQLite 3
31+
run: |
32+
sudo apt-get update
33+
sudo apt-get install sqlite3
34+
35+
- name: Setup PHP
36+
uses: shivammathur/setup-php@v2
37+
with:
38+
php-version: ${{ matrix.php }}
39+
extensions: curl, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv
40+
coverage: none
41+
42+
- name: Install dependencies
43+
run: |
44+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
45+
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
46+
47+
- name: Setup Problem Matches
48+
run: |
49+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
50+
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
51+
52+
- name: Execute tests
53+
run: composer test

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ Add the package to your `composer.json`:
4848
}
4949
],
5050
"require": {
51-
"visualbuilder/laravel-versionable": "*"
51+
"visualbuilder/versionable": "*"
5252
}
5353
}
5454
```
5555

5656
Then run:
5757

5858
```shell
59-
composer require visualbuilder/laravel-versionable
59+
composer require visualbuilder/versionable
6060
```
6161

6262
First, publish the config file and migrations:

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "visualbuilder/laravel-versionable",
2+
"name": "visualbuilder/versionable",
33
"description": "Make Laravel model versionable with polymorphic user support (Fork of overtrue/laravel-versionable).",
44
"require": {
55
"php": "^8.1",

0 commit comments

Comments
 (0)