Skip to content

Commit 72852f6

Browse files
committed
ci: define matrix input using makefile output
1 parent 52d2ed1 commit 72852f6

File tree

2 files changed

+19
-25
lines changed

2 files changed

+19
-25
lines changed

.github/workflows/ci.yaml

Lines changed: 14 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -34,36 +34,25 @@ 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+
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: setup-integration-test
3952
strategy:
4053
fail-fast: false
4154
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
55+
CONNECT_VERSION: ${{ fromJson(needs.setup-integration-test.outputs.versions) }}
6756
steps:
6857
- uses: actions/checkout@v4
6958
- 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)