From 82b6de97e122a0f8f53a63f253756c0cedf02cf2 Mon Sep 17 00:00:00 2001 From: Luka Dschaak Date: Mon, 18 Sep 2023 17:22:50 +0200 Subject: [PATCH] feature: split workflows (#16) Co-authored-by: Jacob Dreesen --- .github/workflows/qa.yaml | 40 +++++++++++++++++++ .../{test-and-qa.yaml => tests.yaml} | 14 ++----- 2 files changed, 43 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/qa.yaml rename .github/workflows/{test-and-qa.yaml => tests.yaml} (77%) diff --git a/.github/workflows/qa.yaml b/.github/workflows/qa.yaml new file mode 100644 index 0000000..445dba1 --- /dev/null +++ b/.github/workflows/qa.yaml @@ -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 diff --git a/.github/workflows/test-and-qa.yaml b/.github/workflows/tests.yaml similarity index 77% rename from .github/workflows/test-and-qa.yaml rename to .github/workflows/tests.yaml index 4f838aa..e750a47 100644 --- a/.github/workflows/test-and-qa.yaml +++ b/.github/workflows/tests.yaml @@ -1,4 +1,4 @@ -name: test-and-qa +name: Tests on: push: @@ -11,7 +11,8 @@ permissions: contents: read jobs: - TestAndQaJobs: + tests: + name: PHPUnit with PHP ${{ matrix.php-version }} ${{ matrix.dependencies }} runs-on: ubuntu-latest strategy: @@ -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