Skip to content

Settings or value

Settings or value #4

Workflow file for this run

name: test
on: push
jobs:
test:
runs-on: ubuntu-latest
# strategy:
# matrix:
# python-version: ["3.11"]
services:
postgres:
image: postgres
ports:
- 5432:5432
env:
POSTGRES_DB: db_test
POSTGRES_PASSWORD: postgres
POSTGRES_PORT: 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:
- name: Checkout project code
uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
# python-version: ${{ matrix.python-version }}
python-version: 3.11.9
- name: Install pipenv
run: |
python -m pip install --upgrade pipenv wheel
- id: chache-pipenv
uses: actions/cache@v1
with:
path: ~/.local/share/virtualenvs/
key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }}
- name: Install dependencies
if: steps.chache-pipenv.outputs.cache-hit != 'true'
run: |
python -m pipenv install --dev && python -m pipenv install -r requirements/base.txt
- name: Apply DB migrations
run: |
pipenv run python manage.py migrate
- name: Run tests
run: |
pipenv run pytest -v