Skip to content

Commit 5d3fcfa

Browse files
authored
Merge pull request #63 from per1234/ref-input
Allow specifying Arduino Lint ref for manual run of integration test
2 parents 271cdff + 3815951 commit 5d3fcfa

File tree

1 file changed

+30
-6
lines changed

1 file changed

+30
-6
lines changed

.github/workflows/test-integration.yml

+30-6
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"
@@ -57,14 +71,24 @@ jobs:
5771
BINDIR="$ARDUINO_LINT_INSTALLATION_PATH" \
5872
sh
5973
60-
# Add installation folder to path to path
74+
# 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)