build(deps-dev): bump black from 23.1.0 to 24.4.2 in /backend/app #283
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PyTest | |
on: | |
push: | |
branches: [master, develop, ci] | |
pull_request: | |
branches: [master, develop] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:14.4 | |
env: | |
POSTGRES_USER: wayout_test | |
POSTGRES_PASSWORD: wayout_test | |
POSTGRES_DB: wayout_test | |
ports: | |
- 7878:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Install and configure Poetry | |
uses: snok/install-poetry@v1 | |
- name: Cache Poetry virtualenv | |
uses: actions/cache@v1 | |
id: cache | |
with: | |
path: ~/.virtualenvs | |
key: poetry-${{ hashFiles('**/poetry.lock') }} | |
restore-keys: | | |
poetry-${{ hashFiles('**/poetry.lock') }} | |
- name: Install Dependencies | |
run: cd backend/app/ && poetry install --no-dev | |
if: steps.cache.outputs.cache-hit != 'true' | |
- name: Copy .env.test file | |
run: cp ./config/.env.test.example ./config/.env.test && cp ./config/.env.example ./config/.env | |
- name: Test with pytest | |
run: cd backend/app/app && poetry run pytest | |