Update test.yml #53
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 tests | |
on: [push] | |
jobs: | |
main: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
include: | |
- python-version: 3.8 | |
- python-version: 3.9 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Checkout Cached Geoconnex Namespace | |
run: | | |
git clone -b master https://github.com/internetofwater/geoconnex.us.git geoconnex.us | |
cd geoconnex.us | |
git checkout 4cc92f91abbecf20650ac595d81726062ffb3894 | |
- uses: actions/setup-python@v2 | |
name: Setup Python ${{ matrix.python-version }} | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install requirements 📦 | |
env: | |
SOURCE_REPO: geoconnex.us | |
run: | | |
pip3 install -r requirements.txt | |
pip3 install -r requirements-dev.txt | |
python3 setup.py install | |
- name: run unit tests ⚙️ | |
env: | |
SOURCE_REPO: geoconnex.us | |
SITEMAP_DIR: sitemap | |
run: | | |
pytest tests/test_util.py | |
pytest tests/test_handler.py | |
- name: run flake8 ⚙️ | |
run: | | |
find . -type f -name "*.py" -not -path "./geoconnex.us/*" | xargs flake8 |