Skip to content

Commit

Permalink
ci: ci plan (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
hywax authored Feb 6, 2024
1 parent d86c918 commit e5f0aab
Showing 1 changed file with 71 additions and 0 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: CI

on:
push:
branches:
- main
pull_request:

jobs:
#test:
# name: PHP ${{ matrix.php }} ${{ matrix.composer-flags }}Unit Test
# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# matrix:
# php: ["8.1", "8.2", "8.3"]
# composer-flags: [""]
# include:
# - php: "8.3"
# composer-flags: "--prefer-lowest "
# steps:
# - name: Checkout
# uses: actions/checkout@v4
#
# - name: Setup PHP
# uses: shivammathur/setup-php@v2
# with:
# php-version: ${{ matrix.php }}
#
# - name: Install Dependencies
# uses: nick-invision/retry@v2
# with:
# timeout_minutes: 10
# max_attempts: 3
# command: composer update ${{ matrix.composer-flags }}
#
# - name: Run Script
# run: vendor/bin/phpunit

style:
name: PHP Style Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.1"
- name: Install Dependencies
uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 3
command: composer install
- name: Run Script
run: vendor/bin/phpcs . --standard=phpcs.xml.dist -nps

staticanalysis:
name: PHPStan Static Analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
- name: Run Script
run: |
composer install
composer global require phpstan/phpstan
~/.composer/vendor/bin/phpstan analyse

0 comments on commit e5f0aab

Please sign in to comment.