From e5009be41d5137dbfc209aca0bd2a5a449f7c634 Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Fri, 26 Jan 2024 13:21:01 +0100 Subject: [PATCH 1/4] Add ability to run full matrix manually and on releases --- .github/workflows/release.yml | 2 ++ .github/workflows/test.yml | 17 ++++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 03a77ce47..3291779ba 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,6 +11,8 @@ permissions: jobs: test: uses: ./.github/workflows/test.yml + with: + full-matrix: true packages: uses: ./.github/workflows/packages.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 363dec4a6..28fcff027 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,7 +1,12 @@ name: test # The name must be the same as in test-docs.yml on: - workflow_call: ~ + workflow_call: + inputs: + full_matrix: + description: "Run the full matrix" + required: true + type: boolean pull_request: paths-ignore: - "**/*.md" @@ -14,6 +19,12 @@ on: - "**/*.asciidoc" schedule: - cron: "0 2 * * *" + workflow_dispatch: + inputs: + full_matrix: + description: "Run the full matrix" + required: true + type: boolean jobs: build-distribution: @@ -31,9 +42,9 @@ jobs: uses: elastic/apm-pipeline-library/.github/actions/version-framework@current with: # Use .ci/.matrix_python_full.yml if it's a scheduled workflow, otherwise use .ci/.matrix_python.yml - versionsFile: .ci/.matrix_python${{ github.event_name == 'schedule' && '_full' || '' }}.yml + versionsFile: .ci/.matrix_python${{ (github.event_name == 'schedule' || inputs.full_matrix) && '_full' || '' }}.yml # Use .ci/.matrix_framework_full.yml if it's a scheduled workflow, otherwise use .ci/.matrix_framework.yml - frameworksFile: .ci/.matrix_framework${{ github.event_name == 'schedule' && '_full' || '' }}.yml + frameworksFile: .ci/.matrix_framework${{ (github.event_name == 'schedule' || inputs.full_matrix) && '_full' || '' }}.yml excludedFile: .ci/.matrix_exclude.yml - name: Split matrix shell: python From d3938f5011805f9dae0ff9db6355750b35e7bf1e Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Fri, 26 Jan 2024 13:23:02 +0100 Subject: [PATCH 2/4] Fix typo --- .github/workflows/test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 28fcff027..f60b8ecaf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,7 +3,7 @@ name: test # The name must be the same as in test-docs.yml on: workflow_call: inputs: - full_matrix: + full-matrix: description: "Run the full matrix" required: true type: boolean @@ -21,7 +21,7 @@ on: - cron: "0 2 * * *" workflow_dispatch: inputs: - full_matrix: + full-matrix: description: "Run the full matrix" required: true type: boolean @@ -42,9 +42,9 @@ jobs: uses: elastic/apm-pipeline-library/.github/actions/version-framework@current with: # Use .ci/.matrix_python_full.yml if it's a scheduled workflow, otherwise use .ci/.matrix_python.yml - versionsFile: .ci/.matrix_python${{ (github.event_name == 'schedule' || inputs.full_matrix) && '_full' || '' }}.yml + versionsFile: .ci/.matrix_python${{ (github.event_name == 'schedule' || inputs.full-matrix) && '_full' || '' }}.yml # Use .ci/.matrix_framework_full.yml if it's a scheduled workflow, otherwise use .ci/.matrix_framework.yml - frameworksFile: .ci/.matrix_framework${{ (github.event_name == 'schedule' || inputs.full_matrix) && '_full' || '' }}.yml + frameworksFile: .ci/.matrix_framework${{ (github.event_name == 'schedule' || inputs.full-matrix) && '_full' || '' }}.yml excludedFile: .ci/.matrix_exclude.yml - name: Split matrix shell: python From 6021774820d3fd25bfde33bc8e0e3aca1c04996d Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Fri, 26 Jan 2024 15:46:14 +0100 Subject: [PATCH 3/4] Run full matrix on push instead in the release --- .github/workflows/release.yml | 2 -- .github/workflows/test.yml | 10 ++-------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3291779ba..03a77ce47 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,8 +11,6 @@ permissions: jobs: test: uses: ./.github/workflows/test.yml - with: - full-matrix: true packages: uses: ./.github/workflows/packages.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f60b8ecaf..be53a2a64 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,12 +1,6 @@ name: test # The name must be the same as in test-docs.yml on: - workflow_call: - inputs: - full-matrix: - description: "Run the full matrix" - required: true - type: boolean pull_request: paths-ignore: - "**/*.md" @@ -42,9 +36,9 @@ jobs: uses: elastic/apm-pipeline-library/.github/actions/version-framework@current with: # Use .ci/.matrix_python_full.yml if it's a scheduled workflow, otherwise use .ci/.matrix_python.yml - versionsFile: .ci/.matrix_python${{ (github.event_name == 'schedule' || inputs.full-matrix) && '_full' || '' }}.yml + versionsFile: .ci/.matrix_python${{ (github.event_name == 'schedule' || github.event_name == 'push' || inputs.full-matrix) && '_full' || '' }}.yml # Use .ci/.matrix_framework_full.yml if it's a scheduled workflow, otherwise use .ci/.matrix_framework.yml - frameworksFile: .ci/.matrix_framework${{ (github.event_name == 'schedule' || inputs.full-matrix) && '_full' || '' }}.yml + frameworksFile: .ci/.matrix_framework${{ (github.event_name == 'schedule' || github.event_name == 'push' || inputs.full-matrix) && '_full' || '' }}.yml excludedFile: .ci/.matrix_exclude.yml - name: Split matrix shell: python From 7105e24a630213f052ea5e69dfa043916bd12f34 Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Fri, 26 Jan 2024 16:14:49 +0100 Subject: [PATCH 4/4] Re-add workflow_call trigger again --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index be53a2a64..0246189b0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,6 +1,7 @@ name: test # The name must be the same as in test-docs.yml on: + workflow_call: ~ pull_request: paths-ignore: - "**/*.md"