Skip to content

chore: Upgrade lint deps. #203

chore: Upgrade lint deps.

chore: Upgrade lint deps. #203

Workflow file for this run

name: Test
on:
pull_request:
branches:
- main
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Test our minimum version bound, the highest version available,
# and something in the middle (i.e. what gets run locally).
python-version: ["3.8", "3.10", "3.11", "3.12"]
sqlalchemy-version: ["1.3.0", "1.4.0", "2.0.0"]
postgres-drivername: ["postgresql+psycopg2", "postgresql+psycopg"]
exclude:
- postgres-drivername: postgresql+psycopg
sqlalchemy-version: 1.3.0
- postgres-drivername: postgresql+psycopg
sqlalchemy-version: 1.4.0
env:
PMR_POSTGRES_IMAGE: postgres:13
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install poetry
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: 1.2.2
- name: Set up cache
uses: actions/cache@v3
with:
path: ~/.cache/pypoetry/virtualenvs
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install dependencies
run: poetry install -E parse
- name: Install snowflake
if: ${{ matrix.sqlalchemy-version == '1.4.0' && matrix.python-version != '3.8.0' }}
run: |
poetry run pip install 'snowflake-sqlalchemy'
- name: Install specific sqlalchemy version
run: |
poetry run pip install 'sqlalchemy~=${{ matrix.sqlalchemy-version }}'
- if: ${{ matrix.sqlalchemy-version == '1.4.0' }}
run: poetry run make lint
- env:
PMR_POSTGRES_DRIVERNAME: ${{ matrix.postgres-drivername }}
SQLALCHEMY_WARN_20: 1
run: poetry run make test
- name: Store test result artifacts
uses: actions/upload-artifact@v3
with:
path: coverage.xml
- name: Coveralls
env:
COVERALLS_FLAG_NAME: run-${{ inputs.working-directory }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_PARALLEL: true
run: |
pip install tomli coveralls
coveralls --service=github
finish:
needs:
- test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pip install tomli coveralls
coveralls --service=github --finish