-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (45 loc) · 1.36 KB
/
run_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
42
43
44
45
46
47
name: Run Unit Tests via Pytest
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository, skip LFS checkouts for now
uses: actions/[email protected]
env:
GIT_LFS_SKIP_SMUDGE: 1
- name: Install [email protected]
run: |
curl -O -sSL https://install.python-poetry.org/install-poetry.py
python install-poetry.py -y --version 1.8.3
echo "PATH=${HOME}/.poetry/bin:${PATH}" >> $GITHUB_ENV
rm install-poetry.py
- name: Set up Python 3.11
uses: actions/[email protected]
with:
python-version: 3.11
- name: Pull LFS (GADM) files for unit tests
run: git lfs pull --include "Database/data/gadm_world.csv"
timeout-minutes: 15
env:
GIT_TRACE: 0
- name: Pull LFS (UNSD) files for unit tests
run: git lfs pull --include "Database/data/UNSD — Methodology.csv"
timeout-minutes: 15
env:
GIT_TRACE: 0
- name: Install dependencies
run: |
poetry --version
poetry check --no-interaction
poetry config virtualenvs.in-project true
poetry install --no-interaction
- name: Run tests
run: poetry run pytest -ra -s tests