Skip to content

Commit 027fe42

Browse files
committed
Add Github actions
1 parent cd86538 commit 027fe42

File tree

6 files changed

+89
-2
lines changed

6 files changed

+89
-2
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: mckenziearts

.github/workflows/phpstan.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: PHPStan
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
phpstan:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
php: [8.1, 8.2]
14+
laravel: [9.*, 10.*]
15+
dependency-version: [prefer-stable]
16+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}
17+
steps:
18+
- uses: actions/checkout@v3
19+
- name: Cache dependencies
20+
uses: actions/cache@v2
21+
with:
22+
path: ~/.composer/cache/files
23+
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
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
29+
coverage: none
30+
- name: Install dependencies
31+
run: composer install --prefer-dist --no-interaction
32+
- name: Run PHPStan
33+
run: composer stan

.github/workflows/pint.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Check & fix styling
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v3
12+
13+
- name: Setup PHP
14+
uses: shivammathur/setup-php@v2
15+
with:
16+
php-version: 8.2
17+
extensions: json, dom, curl, libxml, mbstring
18+
coverage: none
19+
20+
- name: Install Pint
21+
run: composer global require laravel/pint
22+
23+
- name: Run Pint
24+
run: pint
25+
26+
- name: Commit linted files
27+
uses: stefanzweifel/git-auto-commit-action@v4
28+
with:
29+
commit_message: Fix code styling

.github/workflows/tests.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
tests:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v3
12+
13+
- name: Setup PHP
14+
uses: shivammathur/setup-php@v2
15+
with:
16+
php-version: 8.2
17+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite
18+
tools: composer:v2
19+
coverage: none
20+
21+
- name: Install Composer dependencies
22+
run: composer install --prefer-dist --no-interaction
23+
24+
- name: Execute tests
25+
run: composer pest

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"email": "support@laravel.cm",
1818
"issues": "https://github.com/laravelcm/laravel-subscriptions/issues",
1919
"source": "https://github.com/laravelcm/laravel-subscriptions",
20-
"docs": "https://github.com/laravelcm/laravel-subscriptions/blob/master/README.md"
20+
"docs": "https://github.com/laravelcm/laravel-subscriptions/blob/main/README.md"
2121
},
2222
"authors": [
2323
{

pint.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
"declare_parentheses": true,
1313
"declare_strict_types": true,
1414
"explicit_string_variable": true,
15-
"final_class": true,
1615
"final_internal_class": false,
1716
"fully_qualified_strict_types": true,
1817
"global_namespace_import": {

0 commit comments

Comments
 (0)