Skip to content

Commit fef6152

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

File tree

2 files changed

+20
-24
lines changed

2 files changed

+20
-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)
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: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ CONNECT_VERSIONS := \
4949
2022.12.0 \
5050
2022.11.0
5151

52+
print-versions:
53+
@echo $(CONNECT_VERSIONS) | jq -Rc 'split(" ")'
54+
5255
clean:
5356
rm -rf logs reports
5457
find . -type d -empty -delete
@@ -101,6 +104,8 @@ up-%: build
101104
PYTEST_ARGS="$(PYTEST_ARGS)" \
102105
$(DOCKER_COMPOSE) -p $(PROJECT_NAME)-$(subst .,-,$(CONNECT_VERSION)) up -V --abort-on-container-exit --no-build
103106

107+
108+
104109
# Show help message.
105110
help:
106111
@echo "Makefile Targets:"
@@ -111,6 +116,7 @@ help:
111116
@echo " up Start Docker Compose for all Connect versions."
112117
@echo " down Tear down Docker resources for all Connect versions."
113118
@echo " clean Clean up the project directory."
119+
@echo " print-versions Show the available Connect versions."
114120
@echo " help Show this help message."
115121
@echo
116122
@echo "Common Usage:"

0 commit comments

Comments
 (0)