Skip to content

Commit 51a5360

Browse files
committed
feat(tests): add badges for integration testing versions
1 parent cf4a87b commit 51a5360

File tree

1 file changed

+58
-2
lines changed

1 file changed

+58
-2
lines changed

.github/workflows/python-integration.yaml

Lines changed: 58 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
workflow_call:
77
inputs:
88
POSTGRES_VERSIONS:
9-
default: "[ '13', '14', '15', '16', '17' ]"
9+
default: '[ "13", "14", "15", "16", "17" ]'
1010
description: PostgreSQL Versions to test
1111
required: false
1212
type: string
@@ -16,7 +16,7 @@ on:
1616
required: false
1717
type: string
1818
RABBITMQ_VERSIONS:
19-
default: "[ '3.12', '3.13', '4.0', '4.1' ]"
19+
default: '[ "3.12", "3.13", "4.0", "4.1" ]'
2020
description: PostgreSQL Versions to test
2121
required: false
2222
type: string
@@ -40,6 +40,7 @@ jobs:
4040
steps:
4141

4242

43+
4344
- uses: actions/checkout@v4
4445

4546

@@ -108,3 +109,58 @@ jobs:
108109
with:
109110
name: integration-tests-python_${{ inputs.PYTHON_VERSION }}-postgres_${{ matrix.postgres-version }}-rabbitmq_${{ matrix.rabbitmq-version }}
110111
path: test/volumes/artifacts/*
112+
113+
114+
badge-endpoint-versions:
115+
name: Publish Version Badge endpoint files
116+
if: ${{ github.ref_name == 'master' || github.ref_name == 'development' }}
117+
needs:
118+
- unit-test
119+
- report
120+
runs-on: ubuntu-latest
121+
steps:
122+
123+
124+
- name: Create PostgreSQL Shields.io Endpoint.json
125+
shell: bash
126+
run: |
127+
versions=$(echo '${{ inputs.POSTGRES_VERSIONS }}' | tr -d "[]\"" | tr ',' '|' | xargs)
128+
cat <<EOF > badge_endpoint_integration_postgres_versions.json
129+
{
130+
"schemaVersion": 1,
131+
"label": "PostgreSQL",
132+
"message": "$versions",
133+
"color": "#336791",
134+
"style": "plastic"
135+
}
136+
EOF
137+
138+
139+
- name: Upload Badge Endpoint json
140+
uses: actions/upload-artifact@v4
141+
with:
142+
name: badge_endpoint_integration_postgres_versions
143+
path: badge_endpoint_integration_postgres_versions.json
144+
145+
146+
- name: Create RabbitMQ Shields.io Endpoint.json
147+
shell: bash
148+
run: |
149+
versions=$(echo '${{ inputs.RABBITMQ_VERSIONS }}' | tr -d "[]\"" | tr ',' '|' | xargs)
150+
cat <<EOF > badge_endpoint_integration_rabbitmq_versions.json
151+
{
152+
"schemaVersion": 1,
153+
"label": "RabbitMQ",
154+
"message": "$versions",
155+
"logoSvg": "<svg width=\"800px\" height=\"800px\" viewBox=\"-7.5 0 271 271\" xmlns=\"http://www.w3.org/2000/svg\" preserveAspectRatio=\"xMidYMid\"><path d=\"M245.44 108.308h-85.09a7.738 7.738 0 0 1-7.735-7.734v-88.68C152.615 5.327 147.29 0 140.726 0h-30.375c-6.568 0-11.89 5.327-11.89 11.894v88.143c0 4.573-3.697 8.29-8.27 8.31l-27.885.133c-4.612.025-8.359-3.717-8.35-8.325l.173-88.241C54.144 5.337 48.817 0 42.24 0H11.89C5.321 0 0 5.327 0 11.894V260.21c0 5.834 4.726 10.56 10.555 10.56H245.44c5.834 0 10.56-4.726 10.56-10.56V118.868c0-5.834-4.726-10.56-10.56-10.56zm-39.902 93.233c0 7.645-6.198 13.844-13.843 13.844H167.69c-7.646 0-13.844-6.199-13.844-13.844v-24.005c0-7.646 6.198-13.844 13.844-13.844h24.005c7.645 0 13.843 6.198 13.843 13.844v24.005z\" fill=\"#F60\"/></svg>",
156+
"color": "#F60",
157+
"style": "plastic"
158+
}
159+
EOF
160+
161+
162+
- name: Upload Badge Endpoint json
163+
uses: actions/upload-artifact@v4
164+
with:
165+
name: badge_endpoint_integration_rabbitmq_versions
166+
path: badge_endpoint_integration_rabbitmq_versions.json

0 commit comments

Comments
 (0)