Skip to content

[pre-commit.ci] pre-commit autoupdate #100

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #100

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: [ main ]
jobs:
ci:
strategy:
fail-fast: false
matrix:
python-version: [ 3.8 ]
poetry-version: [ 1.1.7 ]
os: [ ubuntu-20.04 ]
runs-on: ${{ matrix.os }}
services:
postgres:
image: postgres:latest
env:
POSTGRES_DB: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
ports:
- 5432:5432
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: Gr1N/setup-poetry@v7
with:
poetry-version: ${{ matrix.poetry-version }}
- uses: actions/cache@v2
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
- run: poetry install
if: steps.cache.outputs.cache-hit != 'true'
- name: pylint
run: |
poetry run pylint --rcfile=.pylintrc goosetools/
- name: Test with pytest
env:
DATABASE_URL: 'postgres://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/postgres'
run: |
poetry run python -m pytest -n 5