Skip to content

fix: github actions #45

fix: github actions

fix: github actions #45

Workflow file for this run

name: Run project tests
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
pull_request:
jobs:
tests:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
container:
image: python:3.12
env:
POETRY_VIRTUALENVS_CREATE: "false"
steps:
- name: Checkout repo content
uses: actions/checkout@v2
- name: Install linux dependencies
run: apt-get update && apt-get install -y binutils gdal-bin libproj-dev
- name: Install poetry
run: curl -sSL https://install.python-poetry.org | python3 -
- name: Install python dependencies
run: ~/.local/bin/poetry export --with dev -f requirements.txt --output requirements.txt && pip install -r requirements.txt
- name: Run django tests
env:
DATABASE_URL: postgres://postgres:postgres@postgres:5432/postgres
CACHE_FILE: /tmp/meep
SECRET_KEY: keyboardcat
run: |
script/bootstrap
coverage run --source=. --branch manage.py test
- name: Generate coverage xml
run: coverage xml
- name: Upload code coverage
run: |
less coverage.xml
pip install codecov
codecov