Skip to content

Commit 3815951

Browse files
committed
Allow specifying Arduino Lint ref for manual run of integration test
When triggered automatically by a push, PR, or schedule event, the integration test uses the latest release of Arduino Lint. That is the same version used by the production engine, so appropriate for testing development on the engine. However, the integration of Arduino Lint into the engine should also be tested before a new version is released to be immediately used by the production engine. This will be made easier by allowing the integration test to be run via a manual trigger of GitHub Actions, specifying any arbitrary Git ref of the Arduino Lint repository to build from.
1 parent 797ce13 commit 3815951

File tree

1 file changed

+29
-5
lines changed

1 file changed

+29
-5
lines changed

.github/workflows/test-integration.yml

+29-5
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,19 @@ on:
2323
- "pyproject.toml"
2424
- "test/**"
2525
workflow_dispatch:
26+
inputs:
27+
arduino-lint-ref:
28+
description: Arduino Lint ref (leave empty for latest release)
29+
default: ""
2630
repository_dispatch:
2731

2832
jobs:
2933
test:
3034
runs-on: ubuntu-latest
3135

36+
env:
37+
ARDUINO_LINT_SOURCE_PATH: arduino-lint
38+
3239
steps:
3340
- name: Checkout repository
3441
uses: actions/checkout@v2
@@ -46,7 +53,14 @@ jobs:
4653
- name: Install Poetry
4754
run: pip install poetry
4855

49-
- name: Install Arduino Lint
56+
- name: Install Taskfile
57+
uses: arduino/setup-task@v1
58+
with:
59+
repo-token: ${{ secrets.GITHUB_TOKEN }}
60+
version: 3.x
61+
62+
- name: Install latest release of Arduino Lint
63+
if: github.event.inputs.arduino-lint-ref == ''
5064
run: |
5165
ARDUINO_LINT_INSTALLATION_PATH="${{ runner.temp }}/arduino-lint"
5266
mkdir --parents "$ARDUINO_LINT_INSTALLATION_PATH"
@@ -60,11 +74,21 @@ jobs:
6074
# Add installation folder to path
6175
echo "$ARDUINO_LINT_INSTALLATION_PATH" >> "$GITHUB_PATH"
6276
63-
- name: Install Taskfile
64-
uses: arduino/setup-task@v1
77+
- name: Checkout Arduino Lint repository
78+
if: github.event.inputs.arduino-lint-ref != ''
79+
uses: actions/checkout@v2
6580
with:
66-
repo-token: ${{ secrets.GITHUB_TOKEN }}
67-
version: 3.x
81+
repository: arduino/arduino-lint
82+
ref: ${{ github.event.inputs.arduino-lint-ref }}
83+
path: ${{ env.ARDUINO_LINT_SOURCE_PATH }}
84+
85+
- name: Build Arduino Lint
86+
if: github.event.inputs.arduino-lint-ref != ''
87+
working-directory: ${{ env.ARDUINO_LINT_SOURCE_PATH }}
88+
run: |
89+
task build
90+
# Add installation folder to path
91+
echo "$PWD" >> "$GITHUB_PATH"
6892
6993
- name: Run integration tests
7094
run: task go:test-integration

0 commit comments

Comments
 (0)