Skip to content

Commit c6afa49

Browse files
author
Itamar Junior
committed
Replace old GitHub Actions workflow with a new Laravel package testing workflow
1 parent be97415 commit c6afa49

File tree

2 files changed

+44
-13
lines changed

2 files changed

+44
-13
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Laravel Package Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
# Step 1: Checkout the repository
17+
- name: Checkout repository
18+
uses: actions/checkout@v3
19+
20+
# Step 2: Setup PHP
21+
- name: Setup PHP
22+
uses: shivammathur/setup-php@v2
23+
with:
24+
php-version: "8.0" # Adjust PHP version as needed
25+
extensions: mbstring, sqlite3, pdo_sqlite
26+
coverage: none
27+
28+
# Step 3: Install Composer dependencies
29+
- name: Install dependencies
30+
run: |
31+
composer install --prefer-dist --no-progress
32+
33+
# Step 4: Setup Laravel environment
34+
- name: Setup Laravel environment
35+
run: |
36+
cp .env.example .env
37+
php artisan key:generate
38+
php artisan config:clear
39+
php artisan migrate --force
40+
41+
# Step 5: Run PHPUnit tests
42+
- name: Run tests
43+
run: |
44+
vendor/bin/phpunit --testdox

.github/workflows/test.yml

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

0 commit comments

Comments
 (0)