Skip to content

Merge pull request #9 from daugaard/dockerfile #112

Merge pull request #9 from daugaard/dockerfile

Merge pull request #9 from daugaard/dockerfile #112

Workflow file for this run

name: Test
on: [push]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:alpine
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
env:
DEBUG: 'on'
DJANGO_SECRET_KEY: ${{ secrets.DJANGO_SECRET_KEY }}
DATABASE_URL: 'pgsql://postgres:postgres@localhost:5432/postgres'
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_STORAGE_BUCKET_NAME: ${{ secrets.AWS_STORAGE_BUCKET_NAME }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.11.6
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install dependencies
run: |
poetry install --no-interaction --no-root
- name: Run tests
run: |
poetry run coverage run --source='.' manage.py test
- name: List coverage
run: |
poetry run coverage report