Skip to content

Commit e37c031

Browse files
tdsteinschloerke
andauthored
ci: define matrix input using makefile output (#393)
Reads the supported Connect versions from `./integration/Makefile` via the `make print-versions` command. --------- Co-authored-by: Barret Schloerke <[email protected]>
1 parent 52d2ed1 commit e37c031

File tree

2 files changed

+20
-25
lines changed

2 files changed

+20
-25
lines changed

.github/workflows/ci.yaml

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

37+
setup-integration-test:
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+
# The `jq` command is "output compact, raw input, slurp, split on new lines, and remove the last element". This results in a JSON array of Connect versions (e.g., ["2025.01.0", "2024.12.0"]).
46+
run: |
47+
versions=$(make print-versions | jq -c -Rs 'split("\n") | .[:-1]')
48+
echo "versions=$versions" >> "$GITHUB_OUTPUT"
49+
3750
integration-test:
3851
runs-on: ubuntu-latest
52+
needs: setup-integration-test
3953
strategy:
4054
fail-fast: false
4155
matrix:
42-
CONNECT_VERSION:
43-
- preview
44-
- 2025.02.0
45-
- 2025.01.0
46-
- 2024.12.0
47-
- 2024.11.0
48-
- 2024.09.0
49-
- 2024.08.0
50-
- 2024.06.0
51-
- 2024.05.0
52-
- 2024.04.1
53-
- 2024.04.0
54-
- 2024.03.0
55-
- 2024.02.0
56-
- 2024.01.0
57-
- 2023.12.0
58-
- 2023.10.0
59-
- 2023.09.0
60-
- 2023.07.0
61-
- 2023.06.0
62-
- 2023.05.0
63-
- 2023.01.1
64-
- 2023.01.0
65-
- 2022.12.0
66-
- 2022.11.0
56+
CONNECT_VERSION: ${{ fromJson(needs.setup-integration-test.outputs.versions) }}
6757
steps:
6858
- uses: actions/checkout@v4
6959
- uses: docker/setup-buildx-action@v3

integration/Makefile

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

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

0 commit comments

Comments
 (0)