forked from usds/justice40-tool
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (42 loc) · 1.4 KB
/
data-checks.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
# This runs tox in the two directories under data
name: Data Checks
on:
pull_request:
branches: [main] # runs on any PR against main
paths:
- "data/**"
jobs:
data-pipeline:
runs-on: ubuntu-latest
defaults:
run:
working-directory: data/data-pipeline
strategy:
matrix:
# checks all of the versions allowed in pyproject.toml
python-version: [3.8, 3.9]
steps:
# installs python
# one execution of the tests per version listed above
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Print variables to help debug
uses: hmarr/debug-action@v2
- name: Load cached Poetry installation
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: ~/.cache/pypoetry/virtualenvs
key: env-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}-${{ hashFiles('.github/workflows/data-checks.yml') }}
- name: Install poetry
uses: snok/install-poetry@v1
- name: Print Poetry settings
run: poetry show -v
- name: Install dependencies
run: poetry install
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
- name: Run tox
run: poetry run tox