23
23
- " pyproject.toml"
24
24
- " test/**"
25
25
workflow_dispatch :
26
+ inputs :
27
+ arduino-lint-ref :
28
+ description : Arduino Lint ref (leave empty for latest release)
29
+ default : " "
26
30
repository_dispatch :
27
31
28
32
jobs :
29
33
test :
30
34
runs-on : ubuntu-latest
31
35
36
+ env :
37
+ ARDUINO_LINT_SOURCE_PATH : arduino-lint
38
+
32
39
steps :
33
40
- name : Checkout repository
34
41
uses : actions/checkout@v2
46
53
- name : Install Poetry
47
54
run : pip install poetry
48
55
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 == ''
50
64
run : |
51
65
ARDUINO_LINT_INSTALLATION_PATH="${{ runner.temp }}/arduino-lint"
52
66
mkdir --parents "$ARDUINO_LINT_INSTALLATION_PATH"
@@ -57,14 +71,24 @@ jobs:
57
71
BINDIR="$ARDUINO_LINT_INSTALLATION_PATH" \
58
72
sh
59
73
60
- # Add installation folder to path to path
74
+ # Add installation folder to path
61
75
echo "$ARDUINO_LINT_INSTALLATION_PATH" >> "$GITHUB_PATH"
62
76
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
65
80
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"
68
92
69
93
- name : Run integration tests
70
94
run : task go:test-integration
0 commit comments