Skip to content

Merge branch 'main' of github.com:jason810496/pgmq-sqlalchemy #19

Merge branch 'main' of github.com:jason810496/pgmq-sqlalchemy

Merge branch 'main' of github.com:jason810496/pgmq-sqlalchemy #19

Workflow file for this run

# This workflow will run tests using pytest and upload the coverage report to Codecov
# Run test with various Python versions
name: Integration Tests
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9","3.10","3.11","3.12"]
name: Test pgmq-sqlalchemy
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# Install dependencies
- name: Install dependencies
run: |
pip install poetry
- name: Set poetry python version
run: |
poetry env use python${{ matrix.python-version }}
- name: Install dependencies
run: poetry install --without=dev
- name: Start PostgreSQL
run: |
cp pgmq_postgres.template.env pgmq_postgres.env
cp pgmq_tests.template.env pgmq_tests.env
make start-db
- name: Run tests and collect coverage
run: poetry run pytest tests --cov=pgmq_sqlalchemy.queue --cov-report=xml -n auto tests
continue-on-error: true
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v4.2.0
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}