diff --git a/.github/workflows/bc.yml b/.github/workflows/bc.yaml similarity index 93% rename from .github/workflows/bc.yml rename to .github/workflows/bc.yaml index 26296d5b..d07fc8b7 100644 --- a/.github/workflows/bc.yml +++ b/.github/workflows/bc.yaml @@ -1,5 +1,8 @@ -on: [push, pull_request] +--- name: Roave + +on: workflow_call + jobs: roave_bc_check: name: BC Check diff --git a/.github/workflows/static.yml b/.github/workflows/linter.yaml similarity index 96% rename from .github/workflows/static.yml rename to .github/workflows/linter.yaml index 83c47ba3..924adc26 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/linter.yaml @@ -1,5 +1,7 @@ -on: [push, pull_request] -name: Static analysis +--- +name: Linters + +on: workflow_call jobs: phpstan: diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml new file mode 100644 index 00000000..e07325a7 --- /dev/null +++ b/.github/workflows/pull-request.yaml @@ -0,0 +1,16 @@ +--- +name: Pull-Request + +on: pull_request + +jobs: + bc: + uses: ./.github/workflows/bc.yaml + + test: + uses: ./.github/workflows/test.yaml + with: + PHP_VERSIONS: '[8.0, 8.1, 8.2]' + + linter: + uses: ./.github/workflows/linter.yaml diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml new file mode 100644 index 00000000..2f3c5faf --- /dev/null +++ b/.github/workflows/push.yaml @@ -0,0 +1,19 @@ +--- +name: Push + +on: + push: + branches: + - master + +jobs: + bc: + uses: ./.github/workflows/bc.yaml + + test: + uses: ./.github/workflows/test.yaml + with: + PHP_VERSIONS: ${{ toJson(["8.0", "8.1", "8.2"]) }} + + linter: + uses: ./.github/workflows/linter.yaml diff --git a/.github/workflows/ci.yml b/.github/workflows/test.yaml similarity index 94% rename from .github/workflows/ci.yml rename to .github/workflows/test.yaml index 525ddc52..b1151b91 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/test.yaml @@ -1,5 +1,12 @@ +--- name: Tests -on: [push, pull_request] + +on: + workflow_call: + inputs: + PHP_VERSIONS: + type: string + required: true jobs: @@ -9,7 +16,7 @@ jobs: strategy: max-parallel: 10 matrix: - php: ['8.0', '8.1', '8.2'] + php: ${{ fromJson(inputs.PHP_VERSIONS) }} steps: - name: Set up PHP