Skip to content

Commit 8e6f93f

Browse files
authored
[skip changelog] Split CI execution of integration tests (#1526)
* Split CI execution of integration tests * Make Github workflows runners cry * Different approach
1 parent 1df5cb8 commit 8e6f93f

7 files changed

+1343
-1281
lines changed

Diff for: .github/tools/get_integration_tests.py

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from pathlib import Path
2+
import json
3+
4+
5+
if __name__ == "__main__":
6+
import sys
7+
8+
tests_path = sys.argv[1]
9+
10+
test_files = [str(f) for f in Path(tests_path).glob("test_*.py")]
11+
print(json.dumps(test_files))

Diff for: .github/workflows/test-go-integration-task.yml

+22-2
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,30 @@ jobs:
5757
5858
echo "::set-output name=result::$RESULT"
5959
60-
test:
60+
tests-collector:
61+
runs-on: ubuntu-latest
6162
needs: run-determination
6263
if: needs.run-determination.outputs.result == 'true'
64+
outputs:
65+
tests-data: ${{ steps.collection.outputs.tests-data }}
66+
steps:
67+
- name: Checkout repository
68+
uses: actions/checkout@v2
6369

70+
- name: Collect tests
71+
id: collection
72+
run: |
73+
echo "::set-output name=tests-data::$(python .github/tools/get_integration_tests.py ./test/)"
74+
75+
test:
76+
needs: tests-collector
6477
strategy:
6578
matrix:
6679
operating-system:
6780
- ubuntu-latest
6881
- windows-latest
6982
- macos-latest
83+
tests: ${{ fromJSON(needs.tests-collector.outputs.tests-data) }}
7084

7185
runs-on: ${{ matrix.operating-system }}
7286

@@ -97,5 +111,11 @@ jobs:
97111
repo-token: ${{ secrets.GITHUB_TOKEN }}
98112
version: 3.x
99113

114+
- name: Build Arduino CLI
115+
run: task go:build
116+
117+
- name: Install poetry deps
118+
run: task poetry:install-deps
119+
100120
- name: Run integration tests
101-
run: task go:test-integration
121+
run: poetry run pytest ${{ matrix.tests }}

0 commit comments

Comments
 (0)