feat(tests): Add python integration test workflow #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | ||
name: 'Python' | ||
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: | ||
unit-test: | ||
name: Unit Test | ||
runs-on: ubuntu-latest | ||
needs: | ||
- lint | ||
strategy: | ||
max-parallel: 4 | ||
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 Python ${{ inputs.PYTHON_VERSION }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ inputs.PYTHON_VERSION }} | ||
- name: Install 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 }} | ||
run: | | ||
make test-integration | ||
- 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/* |