Skip to content

Commit

Permalink
Update Test Suite
Browse files Browse the repository at this point in the history
  • Loading branch information
evansims committed Jun 26, 2023
1 parent 75e1ef5 commit 8359936
Show file tree
Hide file tree
Showing 24 changed files with 1,241 additions and 293 deletions.
147 changes: 0 additions & 147 deletions .circleci/config.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/php_composer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: "Composer"

on:
pull_request:
merge_group:
push:
branches: ["master", "main"]

permissions: {}

defaults:
run:
working-directory: app

jobs:
validate:
name: "Validate"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- run: composer validate

normalize:
name: "Normalize"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- run: composer require --dev ergebnis/composer-normalize

- run: composer config allow-plugins.ergebnis/composer-normalize true

- run: composer normalize
35 changes: 35 additions & 0 deletions .github/workflows/php_pest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "PEST"

on:
pull_request:
merge_group:
push:
branches: ["master", "main"]

permissions: {}

defaults:
run:
working-directory: app

jobs:
pest:
name: "Scan"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: shivammathur/setup-php@v2
with:
php-version: "8.1"
coverage: pcov

- run: composer install --no-progress

- run: vendor/bin/pest --order-by random --fail-on-risky --stop-on-defect --coverage --parallel

- uses: codecov/codecov-action@v3
with:
directory: ./coverage/
flags: unittests
29 changes: 29 additions & 0 deletions .github/workflows/php_phpcsf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: "PHP CS Fixer"

on:
pull_request:
merge_group:
push:
branches: ["master", "main"]

permissions: {}

defaults:
run:
working-directory: app

jobs:
phpcsf:
name: "Scan"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: shivammathur/setup-php@v2
with:
php-version: "8.1"

- run: composer install --no-progress

- run: vendor/bin/php-cs-fixer fix src --dry-run --diff
29 changes: 29 additions & 0 deletions .github/workflows/php_phpstan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: "PHPStan"

on:
pull_request:
merge_group:
push:
branches: ["master", "main"]

permissions: {}

defaults:
run:
working-directory: app

jobs:
phpstan:
name: "Scan"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: shivammathur/setup-php@v2
with:
php-version: "8.1"

- run: composer install --no-progress

# - run: vendor/bin/phpstan analyze --no-ansi --no-progress --debug
29 changes: 29 additions & 0 deletions .github/workflows/php_psalm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: "Psalm"

on:
pull_request:
merge_group:
push:
branches: ["master", "main"]

permissions: {}

defaults:
run:
working-directory: app

jobs:
psalm:
name: "Scan"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: shivammathur/setup-php@v2
with:
php-version: "8.1"

- run: composer install --no-progress

# - run: vendor/bin/psalm
29 changes: 29 additions & 0 deletions .github/workflows/php_rector.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: "Rector"

on:
pull_request:
merge_group:
push:
branches: ["master", "main"]

permissions: {}

defaults:
run:
working-directory: app

jobs:
rector:
name: "Scan"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: shivammathur/setup-php@v2
with:
php-version: "8.1"

- run: composer install --no-progress

- run: vendor/bin/rector process --dry-run
36 changes: 36 additions & 0 deletions .github/workflows/repo_cron_snyk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: "Snyk (Scheduled)"

# This workflow will run after a push to the main branch and as a scheduled job.

on:
push:
branches: ["master", "main"]

permissions: {}

defaults:
run:
working-directory: app

jobs:
snyk:
name: "Scan"
runs-on: ubuntu-latest

steps:
- uses: shivammathur/setup-php@v2
with:
php-version: "8.1"
coverage: none
extensions: mbstring
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/checkout@v3

- run: composer install --no-progress

- uses: snyk/actions/php@master
continue-on-error: true
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
20 changes: 20 additions & 0 deletions .github/workflows/repo_pr_await_approval.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Pull Request Approval"

# Monitor for pull requests being approved.

on:
pull_request:
types: [synchronize]
pull_request_review:
types: [submitted]

permissions: {}

jobs:
wait:
name: "Waiting"
runs-on: ubuntu-latest

if: github.actor == 'dependabot[bot]' || github.event.review.state == 'approved'
steps:
- run: echo "PR approved."
Loading

0 comments on commit 8359936

Please sign in to comment.