Skip to content

Commit 052c250

Browse files
committed
v1
1 parent bbef398 commit 052c250

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+5061
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Tests coverage
2+
3+
on: [ push, pull_request ]
4+
5+
jobs:
6+
test:
7+
name: Pest - coverage
8+
9+
runs-on: ubuntu-latest
10+
11+
services:
12+
db:
13+
image: mysql:8.0
14+
env:
15+
MYSQL_ROOT_PASSWORD: root
16+
MYSQL_DATABASE: laravel
17+
ports:
18+
- 3306
19+
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v2
24+
25+
- name: Setup PHP
26+
uses: shivammathur/setup-php@v2
27+
with:
28+
php-version: 8.2
29+
coverage: xdebug
30+
31+
- name: Install dependencies
32+
run: composer install --prefer-dist --no-interaction
33+
34+
- name: Execute tests
35+
env:
36+
DB_PORT: ${{ job.services.db.ports['3306'] }}
37+
run: XDEBUG_MODE=coverage ./vendor/bin/pest --coverage --min=100

.github/workflows/pest.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Tests
2+
3+
on: [ push, pull_request ]
4+
5+
jobs:
6+
test:
7+
name: Pest - PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - DB ${{ matrix.db }} ${{ matrix.dependency-version }}
8+
9+
runs-on: ubuntu-latest
10+
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
php: [ 8.2, 8.1 ]
15+
laravel: [ 9.* ]
16+
db: [ 'mysql:8.0', 'mysql:5.7', 'mariadb:10.9' ]
17+
dependency-version: [ prefer-lowest, prefer-stable ]
18+
include:
19+
- laravel: 9.*
20+
testbench: ^7.0
21+
22+
services:
23+
db:
24+
image: ${{ matrix.db }}
25+
env:
26+
MYSQL_ROOT_PASSWORD: root
27+
MYSQL_DATABASE: laravel
28+
ports:
29+
- 3306
30+
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
31+
32+
steps:
33+
- name: Checkout code
34+
uses: actions/checkout@v2
35+
36+
- name: Setup PHP
37+
uses: shivammathur/setup-php@v2
38+
with:
39+
php-version: ${{ matrix.php }}
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.dependency-version }} --prefer-dist --no-interaction
46+
47+
- name: Execute tests
48+
env:
49+
DB_PORT: ${{ job.services.db.ports['3306'] }}
50+
run: vendor/bin/pest

.github/workflows/phpstan.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Static code analysis
2+
3+
on: [ push, pull_request ]
4+
5+
jobs:
6+
phpstan:
7+
name: PHPStan
8+
9+
runs-on: ubuntu-latest
10+
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
php: [ 8.2, 8.1, 8.0 ]
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v2
19+
20+
- name: Setup PHP
21+
uses: shivammathur/setup-php@v2
22+
with:
23+
php-version: ${{ matrix.php }}
24+
coverage: none
25+
26+
- name: Install dependencies
27+
run: composer install --prefer-dist --no-interaction
28+
29+
- name: Run PHPStan
30+
run: ./vendor/bin/phpstan analyse --memory-limit=2G --error-format=github
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Update Changelog
2+
3+
on:
4+
release:
5+
types: [ released ]
6+
7+
jobs:
8+
update:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v2
14+
with:
15+
ref: master
16+
17+
- name: Update Changelog
18+
uses: stefanzweifel/changelog-updater-action@v1
19+
with:
20+
latest-version: ${{ github.event.release.name }}
21+
release-notes: ${{ github.event.release.body }}
22+
23+
- name: Commit updated CHANGELOG
24+
uses: stefanzweifel/git-auto-commit-action@v4
25+
with:
26+
branch: master
27+
commit_message: Update CHANGELOG
28+
file_pattern: CHANGELOG.md

0 commit comments

Comments
 (0)