Skip to content
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

Allow specifying Arduino Lint ref for manual run of integration test #63

Merged
merged 2 commits into from
Aug 10, 2021
Merged
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
36 changes: 30 additions & 6 deletions .github/workflows/test-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,19 @@ on:
- "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
Expand All @@ -46,7 +53,14 @@ jobs:
- name: Install Poetry
run: pip install poetry

- name: Install Arduino Lint
- 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"
Expand All @@ -57,14 +71,24 @@ jobs:
BINDIR="$ARDUINO_LINT_INSTALLATION_PATH" \
sh

# Add installation folder to path to path
# Add installation folder to path
echo "$ARDUINO_LINT_INSTALLATION_PATH" >> "$GITHUB_PATH"

- name: Install Taskfile
uses: arduino/setup-task@v1
- name: Checkout Arduino Lint repository
if: github.event.inputs.arduino-lint-ref != ''
uses: actions/checkout@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x
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