From 174b606a731001acf6af476e904d52e23735e6cf Mon Sep 17 00:00:00 2001 From: Luka Dschaak Date: Fri, 15 Sep 2023 17:34:52 +0200 Subject: [PATCH] feature: split workflows --- .github/workflows/qa.yaml | 50 +++++++++++++++++++ .../workflows/{test-and-qa.yaml => test.yaml} | 10 +--- 2 files changed, 52 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..c9341e3 --- /dev/null +++ b/.github/workflows/qa.yaml @@ -0,0 +1,50 @@ +name: qa + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + workflow_dispatch: + +permissions: + contents: read + +jobs: + qa: + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + include: + - php-version: "8.1" + dependencies: "lowest" + - php-version: "8.1" + dependencies: "highest" + - php-version: "8.2" + dependencies: "highest" + + 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