Skip to content

Commit 1b6dfa2

Browse files
committed
ci: define matrix input using makefile output
1 parent 2d77ba3 commit 1b6dfa2

File tree

2 files changed

+19
-24
lines changed

2 files changed

+19
-24
lines changed

.github/workflows/ci.yaml

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -34,35 +34,25 @@ jobs:
3434
- run: make dev
3535
- run: make test
3636

37+
define-integration-test-matrix:
38+
runs-on: ubuntu-latest
39+
outputs:
40+
versions: ${{ steps.versions.outputs.versions }}
41+
steps:
42+
- uses: actions/checkout@v4
43+
- id: versions
44+
working-directory: ./integration
45+
run: |
46+
versions=$(make print-versions | jq -c -Rs 'split("\n") | .[:-1]')
47+
echo "versions=$versions" >> "$GITHUB_OUTPUT"
48+
3749
integration-test:
3850
runs-on: ubuntu-latest
51+
needs: define-integration-test-matrix
3952
strategy:
4053
fail-fast: false
4154
matrix:
42-
CONNECT_VERSION:
43-
- preview
44-
- 2025.01.0
45-
- 2024.12.0
46-
- 2024.11.0
47-
- 2024.09.0
48-
- 2024.08.0
49-
- 2024.06.0
50-
- 2024.05.0
51-
- 2024.04.1
52-
- 2024.04.0
53-
- 2024.03.0
54-
- 2024.02.0
55-
- 2024.01.0
56-
- 2023.12.0
57-
- 2023.10.0
58-
- 2023.09.0
59-
- 2023.07.0
60-
- 2023.06.0
61-
- 2023.05.0
62-
- 2023.01.1
63-
- 2023.01.0
64-
- 2022.12.0
65-
- 2022.11.0
55+
CONNECT_VERSION: ${{ fromJson(needs.define-integration-test-matrix.outputs.versions) }}
6656
steps:
6757
- uses: actions/checkout@v4
6858
- uses: docker/setup-buildx-action@v3

integration/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ up-%: build
101101
PYTEST_ARGS="$(PYTEST_ARGS)" \
102102
$(DOCKER_COMPOSE) -p $(PROJECT_NAME)-$(subst .,-,$(CONNECT_VERSION)) up -V --abort-on-container-exit --no-build
103103

104+
# Show available versions
105+
print-versions:
106+
@printf "%s\n" $(strip $(CONNECT_VERSIONS))
107+
104108
# Show help message.
105109
help:
106110
@echo "Makefile Targets:"
@@ -111,6 +115,7 @@ help:
111115
@echo " up Start Docker Compose for all Connect versions."
112116
@echo " down Tear down Docker resources for all Connect versions."
113117
@echo " clean Clean up the project directory."
118+
@echo " print-versions Show the available Connect versions."
114119
@echo " help Show this help message."
115120
@echo
116121
@echo "Common Usage:"

0 commit comments

Comments
 (0)