Skip to content

Support python 3.11 (#427) #558

Support python 3.11 (#427)

Support python 3.11 (#427) #558

Workflow file for this run

name: Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
unit-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']
steps:
- uses: actions/checkout@v3
- name: Build using Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip3 install pdm
pdm self update
pdm install
- name: Run black
run: |
pdm run black --check --diff recap/ tests/
- name: Run isort
run: |
pdm run isort recap/ tests/ --check-only --diff
- name: Run autoflake
run: |
pdm run autoflake --check-diff --remove-unused-variables --remove-all-unused-imports --recursive recap/ tests/
- name: Run pylint
run: |
pdm run pylint --fail-under=7.0 recap/ tests/
- name: Run pyright
run: |
pdm run pyright
- name: Test with pytest
run: |
pdm run unit
integration-tests:
runs-on: ubuntu-latest
needs: unit-tests
strategy:
matrix:
python-version: ['3.10']
steps:
- uses: actions/checkout@v3
- name: Docker Compose Up
uses: isbang/compose-action@v1.5.1
with:
compose-file: tests/docker-compose.yml
- name: Build using Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip3 install pdm
pdm self update
pdm install
- name: Test with pytest
env:
RECAP_URLS: '["postgresql://postgres:password@localhost:5432/testdb", "sqlite:///file:mem1?mode=memory&cache=shared&uri=true"]'
run: |
pdm run integration
spec-tests:
runs-on: ubuntu-latest
needs: integration-tests
strategy:
matrix:
python-version: ['3.10']
steps:
- uses: actions/checkout@v3
- name: Build using Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip3 install pdm
pdm self update
pdm install
- name: Test spec with pytest
run: |
pdm run spec