forked from mysociety/local-intelligence-hub
-
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (38 loc) · 1.2 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Run project tests
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
pull_request:
jobs:
tests:
runs-on: ubuntu-latest
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/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