-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): Add github action to test code.
- Loading branch information
1 parent
6dd3b40
commit e170548
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: CI | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
- 1.x | ||
- 2.x | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
name: Test on PHP ${{ matrix.php-versions }} | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-versions: ['8.1', '8.2', '8.3'] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
coverage: none | ||
|
||
- name: Install composer and dependencies | ||
uses: php-actions/composer@v6 | ||
|
||
- name: Run Code Sniffer | ||
run: vendor/bin/phpcs | ||
|
||
- name: Run phpstan | ||
run: vendor/bin/phpstan analyse -c phpstan.neon --no-progress | ||
|
||
- name: Run Pest | ||
run: vendor/bin/pest |