Skip to content

Commit 94c1820

Browse files
committed
Move integration test runs to dedicated workflow
Due to the tests being located in a dedicated folder and written in Python, there are unique paths filter requirements for the GitHub Actions workflow that runs the project's integration tests. For this reason, and also to enable the unit test workflow to be applied to projects that use other integration testing approaches (i.e., none at all), it is better to use separate workflows to run unit tests vs. integration tests.
1 parent 365e9a4 commit 94c1820

File tree

3 files changed

+61
-17
lines changed

3 files changed

+61
-17
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Test Integration
2+
3+
on:
4+
push:
5+
paths:
6+
- ".github/workflows/test-go-integration-task.ya?ml"
7+
- "Taskfile.ya?ml"
8+
- "**.go"
9+
- "go.mod"
10+
- "go.sum"
11+
- "poetry.lock"
12+
- "pyproject.toml"
13+
- "test/**"
14+
pull_request:
15+
paths:
16+
- ".github/workflows/test-go-integration-task.ya?ml"
17+
- "Taskfile.ya?ml"
18+
- "**.go"
19+
- "go.mod"
20+
- "go.sum"
21+
- "poetry.lock"
22+
- "pyproject.toml"
23+
- "test/**"
24+
25+
jobs:
26+
test-go:
27+
strategy:
28+
matrix:
29+
operating-system:
30+
- ubuntu-latest
31+
- windows-latest
32+
- macOS-latest
33+
34+
runs-on: ${{ matrix.operating-system }}
35+
36+
steps:
37+
- name: Checkout local repository
38+
uses: actions/checkout@v2
39+
40+
- name: Install Go
41+
uses: actions/setup-go@v2
42+
with:
43+
go-version: "1.16"
44+
45+
- name: Install Taskfile
46+
uses: arduino/setup-task@v1
47+
with:
48+
repo-token: ${{ secrets.GITHUB_TOKEN }}
49+
version: 3.x
50+
51+
- name: Install Python
52+
uses: actions/setup-python@v2
53+
with:
54+
python-version: "3.9"
55+
56+
- name: Install Poetry
57+
run: pip install poetry
58+
59+
- name: Run integration tests
60+
run: task test-integration

.github/workflows/test.yml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ on:
1010
- "**/*.go"
1111
- "**/testdata/**"
1212
- "etc/schemas/**/*.json"
13-
- "pyproject.toml"
14-
- "test/**"
15-
- "Taskfile.yml"
1613
pull_request:
1714
paths:
1815
- ".github/workflows/test.yml"
@@ -22,9 +19,6 @@ on:
2219
- "**/*.go"
2320
- "**/testdata/**"
2421
- "etc/schemas/**/*.json"
25-
- "pyproject.toml"
26-
- "test/**"
27-
- "Taskfile.yml"
2822

2923
env:
3024
BUILDS_ARTIFACT: build-artifacts
@@ -72,17 +66,6 @@ jobs:
7266
flags: unit
7367
fail_ci_if_error: true
7468

75-
- name: Install Python
76-
uses: actions/setup-python@v2
77-
with:
78-
python-version: "3.9"
79-
80-
- name: Install Poetry
81-
run: pip install poetry
82-
83-
- name: Run integration tests
84-
run: task test-integration
85-
8669
build:
8770
runs-on: ubuntu-latest
8871

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Arduino Lint
22

33
[![Tests Status](https://github.com/arduino/arduino-lint/workflows/Run%20tests/badge.svg)](https://github.com/arduino/arduino-lint/actions?workflow=Run+tests)
4+
[![Test Integration status](https://github.com/arduino/arduino-lint/actions/workflows/test-go-integration-task.yml/badge.svg)](https://github.com/arduino/arduino-lint/actions/workflows/test-go-integration-task.yml)
45
[![Check Go status](https://github.com/arduino/arduino-lint/actions/workflows/check-go-task.yml/badge.svg)](https://github.com/arduino/arduino-lint/actions/workflows/check-go-task.yml)
56
[![Publish Nightly Build status](https://github.com/arduino/arduino-lint/actions/workflows/publish-go-nightly-task.yml/badge.svg)](https://github.com/arduino/arduino-lint/actions/workflows/publish-go-nightly-task.yml)
67
[![Check Python status](https://github.com/arduino/arduino-lint/actions/workflows/check-python-task.yml/badge.svg)](https://github.com/arduino/arduino-lint/actions/workflows/check-python-task.yml)

0 commit comments

Comments
 (0)