Skip to content

Commit 211cbb0

Browse files
committed
feat(tests): Add python integration test workflow
1 parent eb313c4 commit 211cbb0

File tree

1 file changed

+83
-0
lines changed

1 file changed

+83
-0
lines changed
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
name: 'Python'
3+
4+
5+
on:
6+
workflow_call:
7+
inputs:
8+
PYTHON_VERSION:
9+
default: '3.11'
10+
description: Python Version to use
11+
required: false
12+
type: string
13+
secrets:
14+
WORKFLOW_TOKEN:
15+
description: "token to clone with"
16+
required: true
17+
18+
19+
jobs:
20+
21+
unit-test:
22+
name: Unit Test
23+
runs-on: ubuntu-latest
24+
needs:
25+
- lint
26+
strategy:
27+
max-parallel: 4
28+
matrix:
29+
postgres-version: [ '13', '14', '15', '16', '17' ]
30+
rabbitmq-version: [ '3.12', '3.13', '4.0', '4.1' ]
31+
# outputs:
32+
# unit-test-coverage: ${{ steps.run-unit-test.outputs.coverage }}
33+
# unit-test-branch_coverage: ${{ steps.run-unit-test.outputs.branch_coverage }}
34+
continue-on-error: true
35+
steps:
36+
37+
38+
- uses: actions/checkout@v4
39+
40+
41+
- name: Set up Python ${{ inputs.PYTHON_VERSION }}
42+
uses: actions/setup-python@v5
43+
with:
44+
python-version: ${{ inputs.PYTHON_VERSION }}
45+
46+
47+
- name: Install Dependencies
48+
run: |
49+
python -m pip install --upgrade pip
50+
pip install -r requirements.txt
51+
pip install -r requirements_test.txt
52+
53+
54+
- run: |
55+
echo "::remove-matcher owner=python::"
56+
57+
58+
- name: Run Tests
59+
id: run-integration-test
60+
continue-on-error: true
61+
shell: bash
62+
env:
63+
CENTURION_RABBITMQ_IMAGE_TAG: ${{ matrix.rabbitmq-version }}
64+
POSTGRES_IMAGE_TAG: ${{ matrix.postgres-version }}
65+
CENTURION_IMAGE_TAG: ${{ env.GITHUB_SHA }}
66+
run: |
67+
make test-integration
68+
69+
70+
- name: Upload Artifacts - Logs
71+
uses: actions/upload-artifact@v4
72+
if: success() || failure()
73+
with:
74+
name: integration-tests-python_${{ matrix.python-version }}-postgres_${{ matrix.postgres-version }}-rabbitmq_${{ matrix.rabbitmq-version }}
75+
path: test/volumes/logs*
76+
77+
78+
- name: Upload Artifacts - Tests
79+
uses: actions/upload-artifact@v4
80+
if: success() || failure()
81+
with:
82+
name: integration-tests-python_${{ matrix.python-version }}-postgres_${{ matrix.postgres-version }}-rabbitmq_${{ matrix.rabbitmq-version }}
83+
path: test/volumes/artifacts/*

0 commit comments

Comments
 (0)