-
Notifications
You must be signed in to change notification settings - Fork 0
108 lines (85 loc) · 3.27 KB
/
python-integration.yaml
File metadata and controls
108 lines (85 loc) · 3.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
---
name: 'Integration Test'
on:
workflow_call:
inputs:
PYTHON_VERSION:
default: '3.11'
description: Python Version to use
required: false
type: string
secrets:
WORKFLOW_TOKEN:
description: "token to clone with"
required: true
jobs:
integration-test:
name: Integration Test
runs-on: ubuntu-latest
strategy:
max-parallel: 8
matrix:
postgres-version: [ '13', '14', '15', '16', '17' ]
rabbitmq-version: [ '3.12', '3.13', '4.0', '4.1' ]
# outputs:
# unit-test-coverage: ${{ steps.run-unit-test.outputs.coverage }}
# unit-test-branch_coverage: ${{ steps.run-unit-test.outputs.branch_coverage }}
continue-on-error: true
steps:
- uses: actions/checkout@v4
- name: Set up Docker Compose
run: |
sudo apt-get update
sudo apt-get install -y docker-compose
- name: Set up Python ${{ inputs.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.PYTHON_VERSION }}
- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements_test.txt
- run: |
echo "::remove-matcher owner=python::"
- name: Run Tests
id: run-integration-test
continue-on-error: true
shell: bash
env:
CENTURION_RABBITMQ_IMAGE_TAG: ${{ matrix.rabbitmq-version }}
POSTGRES_IMAGE_TAG: ${{ matrix.postgres-version }}
CENTURION_IMAGE_TAG: ${{ env.GITHUB_SHA }}
CENTURION_IMAGE_TAG_test: ${{ GITHUB_SHA }}
run: |
echo "CENTURION_IMAGE_TAG: ${CENTURION_IMAGE_TAG}";
echo "CENTURION_IMAGE_TAG_test: ${CENTURION_IMAGE_TAG_test}";
echo "GITHUB_SHA: ${GITHUB_SHA}";
make test-integration
- name: Test Report
if: success() || failure()
uses: dorny/test-reporter@v1
id: test-report
with:
# artifact: unit-test-results-${{ matrix.python-version }}
name: Integration Test Report [python_${{ matrix.python-version }}-postgres_${{ matrix.postgres-version }}-rabbitmq_${{ matrix.rabbitmq-version }}]
path: 'integration.JUnit.xml'
reporter: java-junit
- name: Upload Junit Test Report
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: integration-test-report-junit-python_${{ matrix.python-version }}-postgres_${{ matrix.postgres-version }}-rabbitmq_${{ matrix.rabbitmq-version }}
path: integration.JUnit.xml
- name: Upload Artifacts - Logs
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: integration-tests-python_${{ matrix.python-version }}-postgres_${{ matrix.postgres-version }}-rabbitmq_${{ matrix.rabbitmq-version }}
path: test/volumes/logs*
- name: Upload Artifacts - Tests
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: integration-tests-python_${{ matrix.python-version }}-postgres_${{ matrix.postgres-version }}-rabbitmq_${{ matrix.rabbitmq-version }}
path: test/volumes/artifacts/*