Skip to content

Commit 03b1f9f

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

File tree

1 file changed

+100
-0
lines changed

1 file changed

+100
-0
lines changed
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
---
2+
name: 'Integration Test'
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+
integration-test:
22+
name: Integration Test
23+
runs-on: ubuntu-latest
24+
strategy:
25+
max-parallel: 8
26+
matrix:
27+
postgres-version: [ '13', '14', '15', '16', '17' ]
28+
rabbitmq-version: [ '3.12', '3.13', '4.0', '4.1' ]
29+
continue-on-error: true
30+
steps:
31+
32+
33+
- uses: actions/checkout@v4
34+
35+
36+
- name: Set up Docker Compose
37+
run: |
38+
sudo apt-get update
39+
sudo apt-get install -y docker-compose
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 Python 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+
CENTURION_POSTGRES_IMAGE_TAG: ${{ matrix.postgres-version }}
65+
run: |
66+
export CENTURION_IMAGE_TAG=${GITHUB_SHA};
67+
make test-integration
68+
69+
70+
- name: Test Report
71+
if: success() || failure()
72+
uses: dorny/test-reporter@v1
73+
id: test-report
74+
with:
75+
name: Integration Test Report [python_${{ inputs.PYTHON_VERSION }}-postgres_${{ matrix.postgres-version }}-rabbitmq_${{ matrix.rabbitmq-version }}]
76+
path: 'integration.JUnit.xml'
77+
reporter: java-junit
78+
79+
80+
- name: Upload Junit Test Report
81+
uses: actions/upload-artifact@v4
82+
if: success() || failure()
83+
with:
84+
name: integration-test-report-junit-python_${{ inputs.PYTHON_VERSION }}-postgres_${{ matrix.postgres-version }}-rabbitmq_${{ matrix.rabbitmq-version }}
85+
path: integration.JUnit.xml
86+
87+
- name: Upload Artifacts - Logs
88+
uses: actions/upload-artifact@v4
89+
if: success() || failure()
90+
with:
91+
name: integration-logs-python_${{ inputs.PYTHON_VERSION }}-postgres_${{ matrix.postgres-version }}-rabbitmq_${{ matrix.rabbitmq-version }}
92+
path: test/volumes/log/*
93+
94+
95+
- name: Upload Artifacts - Tests
96+
uses: actions/upload-artifact@v4
97+
if: success() || failure()
98+
with:
99+
name: integration-tests-python_${{ inputs.PYTHON_VERSION }}-postgres_${{ matrix.postgres-version }}-rabbitmq_${{ matrix.rabbitmq-version }}
100+
path: test/volumes/artifacts/*

0 commit comments

Comments
 (0)