add poetry to project

This commit is contained in:
Jakub Miazek
2022-10-03 14:29:17 +02:00
parent 7b079f84c1
commit 68eca7c0f6
8 changed files with 2106 additions and 1369 deletions

View File

@@ -1,8 +1,9 @@
name: Unit Tests
on: [pull_request]
name: Continuous Disaster...
on:
pull_request:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
@@ -26,13 +27,22 @@ jobs:
steps:
- name: Create database schema
run: PGPASSWORD=secret psql -h 127.0.0.1 -d testdb -U user -c "CREATE SCHEMA shakespeare; CREATE SCHEMA happy_hog;"
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install required libs
run: pip install -r requirements.txt
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-3.10-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Run tests
run: pytest
env: