173 Validate categorical fields Main_Event and Hazards #337
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |