Skip to content

Commit

Permalink
feature: split workflows (#16)
Browse files Browse the repository at this point in the history
Co-authored-by: Jacob Dreesen <j.dreesen@neusta.de>
  • Loading branch information
lukadschaak and jdreesen committed Sep 18, 2023
1 parent 0ad4256 commit 82b6de9
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 11 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/qa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Quality Assurance

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:

permissions:
contents: read

jobs:
qa:
name: Quality Checks
runs-on: ubuntu-latest

steps:
- name: Git Checkout
uses: actions/checkout@v4

- name: PHP Setup
uses: shivammathur/setup-php@v2
with:
php-version: 8.2

- name: Validate composer.json
run: composer validate --strict

- name: Install dependencies
uses: ramsey/composer-install@v2

- name: Check CS-Fixer
run: composer cs:check

- name: Check PHPStan
run: composer phpstan

- name: Execute tests
run: composer tests
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test-and-qa
name: Tests

on:
push:
Expand All @@ -11,7 +11,8 @@ permissions:
contents: read

jobs:
TestAndQaJobs:
tests:
name: PHPUnit with PHP ${{ matrix.php-version }} ${{ matrix.dependencies }}
runs-on: ubuntu-latest

strategy:
Expand All @@ -34,19 +35,10 @@ jobs:
with:
php-version: ${{ matrix.php-version }}

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Install dependencies
uses: ramsey/composer-install@v2
with:
dependency-versions: ${{ matrix.dependencies }}

- name: Check CS-Fixer
run: composer cs:check

- name: Check PHPStan
run: composer phpstan

- name: Execute tests
run: composer tests

0 comments on commit 82b6de9

Please sign in to comment.