Skip to content

Bump pre-commit from 3.8.0 to 4.0.1 #64

Bump pre-commit from 3.8.0 to 4.0.1

Bump pre-commit from 3.8.0 to 4.0.1 #64

Workflow file for this run

name: CI
on:
push:
branches: ['main']
pull_request:
branches: ['main']
jobs:
linting:
runs-on: ubuntu-latest
steps:
#----------------------------------------------
# check-out repo and set-up python
#----------------------------------------------
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
#----------------------------------------------
# load pip cache if cache exists
#----------------------------------------------
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip
restore-keys: ${{ runner.os }}-pip
#----------------------------------------------
# install and run linters
#----------------------------------------------
- run: python -m pip install black flake8 isort
- run: |
flake8 . --count --show-source --statistics
black . --check
isort .
test:
needs: linting
strategy:
fail-fast: true
matrix:
os: ['ubuntu-latest', 'macos-latest']
python-version: ['3.11']
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install PostgreSQL Development Tools
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update && sudo apt-get install -y libpq-dev
- name: Install PostgreSQL
if: matrix.os == 'macos-latest'
run: brew install postgresql
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Cache Poetry dependencies
uses: actions/cache@v3
with:
path: |
~/.cache/pypoetry
.venv
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
poetry-${{ runner.os }}-
- name: Install dependencies
run: poetry install --no-interaction --no-root
- name: Run tests
run: |
source .venv/bin/activate
pytest tests/