Add support for TIGER years 2000 and 2009-2023 (incl.) #251
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: Code quality checks | |
on: | |
pull_request: | |
push: | |
branches: ['main'] | |
jobs: | |
code-quality: | |
name: Code quality checks | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version-file: '.python-version' | |
- name: Install dependencies | |
run: pip install .[dev] | |
- name: Run unit tests | |
run: | | |
python -m unittest discover -v -s "./epymorph" -p "*_test.py" | |
- name: Check imports and formatting | |
run: | | |
if isort --check .; then | |
imp_result=0 | |
else | |
echo "isort detected inconsistent import sorting" | |
echo "check that isort is running on your machine!" | |
imp_result=1 | |
fi | |
if autopep8 --recursive --in-place --exit-code .; then | |
fmt_result=0 | |
else | |
echo "autopep8 detected inconsistent code formatting" | |
echo "check that autopep8 is running on your machine!" | |
fmt_result=1 | |
fi | |
if [[ $fmt_result -ne 0 || $imp_result -ne 0 ]]; then | |
exit 1 | |
else | |
echo "All checks passed." | |
exit 0 | |
fi |