Skip to content

pre-0.26.0 - logging refactoring - start banner - lazy meta importer - documentation #1590

pre-0.26.0 - logging refactoring - start banner - lazy meta importer - documentation

pre-0.26.0 - logging refactoring - start banner - lazy meta importer - documentation #1590

Workflow file for this run

name: Python package
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
env:
POETRY_VIRTUALENVS_CREATE: false
strategy:
max-parallel: 4
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
services:
rabbitmq:
image: rabbitmq
ports:
- 5672:5672
localstack_main:
image: localstack/localstack:latest
env:
DEFAULT_REGION: eu-west-1
PERSISTENCE: 0
ports:
- 4566:4566
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Set up Poetry cache for Python dependencies
uses: actions/cache@v3
if: startsWith(runner.os, 'Linux')
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: ${{ runner.os }}-poetry-
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | POETRY_HOME="$HOME/.poetry" python - --yes
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
- name: Install dependencies
run: |
poetry install --no-interaction -E uvloop -E protobuf -E aiodns
poetry show --tree
- name: Test poetry build step
run: poetry build
- name: Run unit tests
env:
TOMODACHI_TEST_AWS_REGION: eu-west-1
TOMODACHI_TEST_AWS_ACCESS_KEY_ID: 000000000000
TOMODACHI_TEST_AWS_ACCESS_SECRET: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
TOMODACHI_TEST_SQS_QUEUE_PREFIX: pytest-
TOMODACHI_TEST_SNS_TOPIC_PREFIX: pytest-
TOMODACHI_TEST_AWS_SNS_ENDPOINT_URL: http://localhost:4566
TOMODACHI_TEST_AWS_SQS_ENDPOINT_URL: http://localhost:4566
TOMODACHI_TEST_SERVICE_UUID: 5ecd36d4-99a7-46bb-b620-06bb0575edbd
TOMODACHI_TEST_SNS_KMS_MASTER_KEY_ID: arn:aws:kms:eu-west-1:000000000000:key/2af37855-cd62-4e38-bca5-7b907d948131
TOMODACHI_TEST_SQS_KMS_MASTER_KEY_ID: arn:aws:kms:eu-west-1:000000000000:key/63710c9b-75e6-4398-94c7-f67cf3f53802
TOMODACHI_TEST_RABBITMQ_ENABLED: true
run: pytest --cov=./ -n auto tests -v
- name: Lint with flake8
run: flake8
- name: Run dummy service
run: tomodachi run tests/run_example_service.py
- name: Run dummy service (with uvloop)
run: tomodachi run --loop uvloop tests/run_example_service.py
- name: Output version
run: tomodachi -v
- name: tomodachi --dependency-versions
run: tomodachi --dependency-versions
- name: Type check with mypy
run: mypy
- name: Codecov
run: codecov --token=${{ secrets.CODECOV_TOKEN }}