-
-
Notifications
You must be signed in to change notification settings - Fork 3
94 lines (81 loc) · 2.5 KB
/
test-integration.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Test Integration
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
on:
push:
paths:
- ".github/workflows/test-integration.yml"
- "Taskfile.yml"
- "**.go"
- "go.mod"
- "go.sum"
- "poetry.lock"
- "pyproject.toml"
- "test/**"
pull_request:
paths:
- ".github/workflows/test-integration.yml"
- "Taskfile.yml"
- "**.go"
- "go.mod"
- "go.sum"
- "poetry.lock"
- "pyproject.toml"
- "test/**"
workflow_dispatch:
inputs:
arduino-lint-ref:
description: Arduino Lint ref (leave empty for latest release)
default: ""
repository_dispatch:
jobs:
test:
runs-on: ubuntu-latest
env:
ARDUINO_LINT_SOURCE_PATH: arduino-lint
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: "1.14"
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install Poetry
run: pip install poetry
- name: Install Taskfile
uses: arduino/setup-task@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x
- name: Install latest release of Arduino Lint
if: github.event.inputs.arduino-lint-ref == ''
run: |
ARDUINO_LINT_INSTALLATION_PATH="${{ runner.temp }}/arduino-lint"
mkdir --parents "$ARDUINO_LINT_INSTALLATION_PATH"
curl \
-fsSL \
https://raw.githubusercontent.com/arduino/arduino-lint/main/etc/install.sh \
| \
BINDIR="$ARDUINO_LINT_INSTALLATION_PATH" \
sh
# Add installation folder to path
echo "$ARDUINO_LINT_INSTALLATION_PATH" >> "$GITHUB_PATH"
- name: Checkout Arduino Lint repository
if: github.event.inputs.arduino-lint-ref != ''
uses: actions/checkout@v2
with:
repository: arduino/arduino-lint
ref: ${{ github.event.inputs.arduino-lint-ref }}
path: ${{ env.ARDUINO_LINT_SOURCE_PATH }}
- name: Build Arduino Lint
if: github.event.inputs.arduino-lint-ref != ''
working-directory: ${{ env.ARDUINO_LINT_SOURCE_PATH }}
run: |
task build
# Add installation folder to path
echo "$PWD" >> "$GITHUB_PATH"
- name: Run integration tests
run: task go:test-integration