dependencies #3
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
name: CI | |
on: | |
- pull_request | |
- push | |
jobs: | |
pest: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
php: ["8.0"] | |
name: Pest - PHP ${{ matrix.php }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: dom, mbstring, soap, bcmath, pdo_sqlite, intl | |
coverage: pcov | |
- uses: ramsey/composer-install@v1 | |
with: | |
composer-options: "--prefer-dist --optimize-autoloader --ignore-platform-reqs" | |
- name: Run PestPHP | |
run: vendor/bin/pest --coverage --coverage-clover test-results/pest.xml | |
env: | |
AWS_ACCESS_KEY_ID: fake | |
AWS_SECRET_ACCESS_KEY: fake | |
AWS_SESSION_TOKEN: fake | |
- name: Upload coverage to Codecov | |
if: always() | |
uses: codecov/codecov-action@v2 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
flags: pest-${{ matrix.php }} | |
file: test-results/pest.xml | |
larastan: | |
runs-on: ubuntu-latest | |
name: Larastan | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: "8.0" | |
extensions: soap, bcmath, pdo_sqlite, intl | |
- uses: ramsey/composer-install@v1 | |
with: | |
composer-options: "--prefer-dist --optimize-autoloader --ignore-platform-reqs" | |
- name: Run Larastan | |
run: vendor/bin/phpstan analyse --no-progress | |
eslint: | |
runs-on: ubuntu-latest | |
name: ESLint | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: yarn install | |
- name: Run ESLint | |
run: yarn run lint | |
jest: | |
runs-on: ubuntu-latest | |
name: Jest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: "15" | |
- name: Install dependencies | |
run: yarn install | |
- name: Run Jest | |
run: yarn test --coverage --coverageDirectory=test-results/jest | |
- name: Upload coverage to Codecov | |
if: always() | |
uses: codecov/codecov-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
flags: jest | |
file: test-results/jest/clover.xml | |
# phpcs: | |
# runs-on: ubuntu-latest | |
# name: PHP Style Fixer | |
# steps: | |
# - uses: actions/checkout@v2 | |
# - uses: shivammathur/setup-php@v2 | |
# with: | |
# php-version: '7.4' | |
# extensions: soap, bcmath, pdo_sqlite | |
# - name: Get Composer Cache Directory | |
# id: composer-cache | |
# run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
# - uses: actions/cache@v2 | |
# with: | |
# path: ${{ steps.composer-cache.outputs.dir }} | |
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
# restore-keys: ${{ runner.os }}-composer- | |
# - name: Install Composer dependencies | |
# run: composer install --no-interaction --no-progress --prefer-dist --optimize-autoloader --ignore-platform-reqs | |
# - name: Run PHP-CS-Fixer | |
# run: vendor/bin/php-cs-fixer fix --dry-run --diff --allow-risky=yes |