Skip to content

Add additional triggers to integration test workflow #124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check-action-metadata-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Determine if the rest of the workflow should run
id: determination
run: |
RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x"
RELEASE_BRANCH_REGEX="^refs/heads/v[0-9]+$"
# The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead.
if [[
"${{ github.event_name }}" != "create" ||
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-files-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Determine if the rest of the workflow should run
id: determination
run: |
RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x"
RELEASE_BRANCH_REGEX="^refs/heads/v[0-9]+$"
# The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead.
if [[
"${{ github.event_name }}" != "create" ||
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-general-formatting-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Determine if the rest of the workflow should run
id: determination
run: |
RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x"
RELEASE_BRANCH_REGEX="^refs/heads/v[0-9]+$"
# The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead.
if [[
"${{ github.event_name }}" != "create" ||
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-license.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- name: Determine if the rest of the workflow should run
id: determination
run: |
RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x"
RELEASE_BRANCH_REGEX="^refs/heads/v[0-9]+$"
# The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead.
if [[
"${{ github.event_name }}" != "create" ||
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-markdown-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Determine if the rest of the workflow should run
id: determination
run: |
RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x"
RELEASE_BRANCH_REGEX="^refs/heads/v[0-9]+$"
# The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead.
if [[
"${{ github.event_name }}" != "create" ||
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-npm-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Determine if the rest of the workflow should run
id: determination
run: |
RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x"
RELEASE_BRANCH_REGEX="^refs/heads/v[0-9]+$"
# The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead.
if [[
"${{ github.event_name }}" != "create" ||
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-prettier-formatting-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ jobs:
- name: Determine if the rest of the workflow should run
id: determination
run: |
RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x"
RELEASE_BRANCH_REGEX="^refs/heads/v[0-9]+$"
# The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead.
if [[
"${{ github.event_name }}" != "create" ||
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-python-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- name: Determine if the rest of the workflow should run
id: determination
run: |
RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x"
RELEASE_BRANCH_REGEX="^refs/heads/v[0-9]+$"
# The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead.
if [[
"${{ github.event_name }}" != "create" ||
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-taskfiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Determine if the rest of the workflow should run
id: determination
run: |
RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x"
RELEASE_BRANCH_REGEX="^refs/heads/v[0-9]+$"
# The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead.
if [[
"${{ github.event_name }}" != "create" ||
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-toc-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Determine if the rest of the workflow should run
id: determination
run: |
RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x"
RELEASE_BRANCH_REGEX="^refs/heads/v[0-9]+$"
# The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead.
if [[
"${{ github.event_name }}" != "create" ||
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-yaml-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Determine if the rest of the workflow should run
id: determination
run: |
RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x"
RELEASE_BRANCH_REGEX="^refs/heads/v[0-9]+$"
# The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead.
if [[
"${{ github.event_name }}" != "create" ||
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/spell-check-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Determine if the rest of the workflow should run
id: determination
run: |
RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x"
RELEASE_BRANCH_REGEX="^refs/heads/v[0-9]+$"
# The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead.
if [[
"${{ github.event_name }}" != "create" ||
Expand Down
50 changes: 49 additions & 1 deletion .github/workflows/test-integration.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Run integration tests

on:
create:

pull_request:
paths:
- ".github/workflows/test-integration.yml"
Expand All @@ -21,14 +23,47 @@ on:
- "action.yml"
- "compilesketches/**"

repository_dispatch:

schedule:
# Run periodically to catch breakage caused by external changes.
- cron: "0 12 * * THU"

workflow_dispatch:

env:
SKETCHES_REPORTS_PATH: sketches-reports
TESTDATA_PLATFORMS_PATH: .github/workflows/testdata/platforms
TESTDATA_SKETCHES_PATH: .github/workflows/testdata/sketches
TESTDATA_REPORTS_PATH: .github/workflows/testdata/reports

jobs:
run-determination:
runs-on: ubuntu-latest
outputs:
result: ${{ steps.determination.outputs.result }}
steps:
- name: Determine if the rest of the workflow should run
id: determination
run: |
RELEASE_BRANCH_REGEX="^refs/heads/v[0-9]+$"
# The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead.
if [[
"${{ github.event_name }}" != "create" ||
"${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX
]]; then
# Run the other jobs.
RESULT="true"
else
# There is no need to run the other jobs.
RESULT="false"
fi

echo "result=$RESULT" >> $GITHUB_OUTPUT

default-inputs:
needs: run-determination
if: needs.run-determination.outputs.result == 'true'
runs-on: ubuntu-latest

steps:
Expand All @@ -49,6 +84,8 @@ jobs:
uses: ./extras/compile-sketches

all-inputs:
needs: run-determination
if: needs.run-determination.outputs.result == 'true'
runs-on: ubuntu-latest

strategy:
Expand Down Expand Up @@ -120,6 +157,8 @@ jobs:

multiple-steps:
name: multiple-steps (${{ matrix.board.source-type }})
needs: run-determination
if: needs.run-determination.outputs.result == 'true'
runs-on: ubuntu-latest

strategy:
Expand Down Expand Up @@ -209,6 +248,8 @@ jobs:
- examples/Sweep

python-package-dependency:
needs: run-determination
if: needs.run-determination.outputs.result == 'true'
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -239,6 +280,8 @@ jobs:

# Targeted testing for ESP32 boards platform support.
pyserial-dependency:
needs: run-determination
if: needs.run-determination.outputs.result == 'true'
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -267,7 +310,10 @@ jobs:
- ${{ env.TESTDATA_SKETCHES_PATH }}/BareMinimum

check-sketches-reports:
needs: all-inputs
needs:
- run-determination
- all-inputs
if: needs.run-determination.outputs.result == 'true'
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -334,6 +380,8 @@ jobs:
exit $EXIT_STATUS

expected-failed-compilation:
needs: run-determination
if: needs.run-determination.outputs.result == 'true'
runs-on: ubuntu-latest

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-python-poetry-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Determine if the rest of the workflow should run
id: determination
run: |
RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x"
RELEASE_BRANCH_REGEX="^refs/heads/v[0-9]+$"
# The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead.
if [[
"${{ github.event_name }}" != "create" ||
Expand Down