1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- name: Linux
- # Run on PR requests. And on master itself.
- on:
- push:
- branches:
- - main
- pull_request:
- jobs:
- test:
- name: Test, Linux, Python ${{ matrix.python }}
- runs-on: ubuntu-latest
- strategy:
- fail-fast: false
- matrix:
- include:
- # 2019
- - python: 3.8
- pins: ""
- # 2021
- - python: 3.9
- pins: ""
- # 2022
- - python: "3.10"
- pins: ""
- # current
- - python: "3.11"
- pins: ""
- services:
- postgres:
- image: postgres:14-alpine
- env:
- POSTGRES_PASSWORD: postgres
- ports:
- - 5432:5432
- steps:
- - uses: actions/checkout@v3
- - name: Set up Python ${{ matrix.python }}
- uses: actions/setup-python@v4
- with:
- python-version: ${{ matrix.python }}
- - name: Install python dependencies
- run: |
- pip install --disable-pip-version-check --upgrade pip setuptools
- pip install -e .[dramatiq,fastapi,auth,celery,fluentbit,sql,test] ${{ matrix.pins }}
- pip list
- - name: Run tests
- run: pytest tests --cov
- - name: Wait for postgres
- run: scripts/wait-for-postgres.sh
- env:
- POSTGRES_URL: 'postgres:postgres@localhost:5432'
- timeout-minutes: 1
- - name: Run integration tests
- run: pytest integration_tests
- env:
- POSTGRES_URL: 'postgres:postgres@localhost:5432'
|