From decdf1611d953428f9e872d58d839f7c36ab0d39 Mon Sep 17 00:00:00 2001 From: Luka Dschaak Date: Fri, 15 Sep 2023 17:34:52 +0200 Subject: [PATCH 1/6] feature: split workflows --- .github/workflows/qa.yaml | 39 +++++++++++++++++++ .../workflows/{test-and-qa.yaml => test.yaml} | 10 +---- 2 files changed, 41 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/qa.yaml rename .github/workflows/{test-and-qa.yaml => test.yaml} (85%) diff --git a/.github/workflows/qa.yaml b/.github/workflows/qa.yaml new file mode 100644 index 0000000..36ba09f --- /dev/null +++ b/.github/workflows/qa.yaml @@ -0,0 +1,39 @@ +name: qa + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + workflow_dispatch: + +permissions: + contents: read + +jobs: + qa: + 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 and composer.lock + 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/test.yaml similarity index 85% rename from .github/workflows/test-and-qa.yaml rename to .github/workflows/test.yaml index 4f838aa..af9f900 100644 --- a/.github/workflows/test-and-qa.yaml +++ b/.github/workflows/test.yaml @@ -1,4 +1,4 @@ -name: test-and-qa +name: test on: push: @@ -11,7 +11,7 @@ permissions: contents: read jobs: - TestAndQaJobs: + test: runs-on: ubuntu-latest strategy: @@ -42,11 +42,5 @@ jobs: 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 From 3aa70a4c5b95c14b535075da3bb401614372c5c5 Mon Sep 17 00:00:00 2001 From: Luka Dschaak Date: Mon, 18 Sep 2023 16:40:17 +0200 Subject: [PATCH 2/6] [apply-suggestion] Rename als Jobs to nice looking Names --- .github/workflows/qa.yaml | 2 +- .github/workflows/test.yaml | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/qa.yaml b/.github/workflows/qa.yaml index 36ba09f..f8f0fc9 100644 --- a/.github/workflows/qa.yaml +++ b/.github/workflows/qa.yaml @@ -1,4 +1,4 @@ -name: qa +name: Quality Assurance on: push: diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index af9f900..ad22342 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,4 +1,4 @@ -name: test +name: Tests on: push: @@ -11,7 +11,8 @@ permissions: contents: read jobs: - test: + tests: + name: PHPUnit with PHP ${{ matrix.php-version }} ${{ dependencies }} runs-on: ubuntu-latest strategy: From 73c563292d8394c1a6821644dd142160c836f737 Mon Sep 17 00:00:00 2001 From: Luka Dschaak Date: Mon, 18 Sep 2023 16:40:58 +0200 Subject: [PATCH 3/6] refactor: remove composer validate form tests.yaml --- .github/workflows/{test.yaml => tests.yaml} | 3 --- 1 file changed, 3 deletions(-) rename .github/workflows/{test.yaml => tests.yaml} (90%) diff --git a/.github/workflows/test.yaml b/.github/workflows/tests.yaml similarity index 90% rename from .github/workflows/test.yaml rename to .github/workflows/tests.yaml index ad22342..98bb973 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/tests.yaml @@ -35,9 +35,6 @@ 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: From 0b33c6fb72ff1b27099500fc78cda764f8233fe3 Mon Sep 17 00:00:00 2001 From: Luka Dschaak Date: Mon, 18 Sep 2023 17:14:09 +0200 Subject: [PATCH 4/6] [apply-suggestion] Use special name for Quality Checks --- .github/workflows/qa.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/qa.yaml b/.github/workflows/qa.yaml index f8f0fc9..e1e1972 100644 --- a/.github/workflows/qa.yaml +++ b/.github/workflows/qa.yaml @@ -12,6 +12,7 @@ permissions: jobs: qa: + name: Quality Checks runs-on: ubuntu-latest steps: From bdeadfefe9b6d35e7f84f7a6b0034b25b39278b6 Mon Sep 17 00:00:00 2001 From: Luka Dschaak Date: Mon, 18 Sep 2023 17:17:25 +0200 Subject: [PATCH 5/6] fix: Unrecognized named-value: 'dependencies' --- .github/workflows/tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 98bb973..e750a47 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -12,7 +12,7 @@ permissions: jobs: tests: - name: PHPUnit with PHP ${{ matrix.php-version }} ${{ dependencies }} + name: PHPUnit with PHP ${{ matrix.php-version }} ${{ matrix.dependencies }} runs-on: ubuntu-latest strategy: From 38b8369dfd9e53782b565d3e5ae89c1bd0932feb Mon Sep 17 00:00:00 2001 From: Jacob Dreesen Date: Mon, 18 Sep 2023 17:20:12 +0200 Subject: [PATCH 6/6] Fix step name --- .github/workflows/qa.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/qa.yaml b/.github/workflows/qa.yaml index e1e1972..445dba1 100644 --- a/.github/workflows/qa.yaml +++ b/.github/workflows/qa.yaml @@ -24,7 +24,7 @@ jobs: with: php-version: 8.2 - - name: Validate composer.json and composer.lock + - name: Validate composer.json run: composer validate --strict - name: Install dependencies