Support for frontend caching #242
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: tests | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python: | |
- "3.10" | |
- "3.11" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Cache python packages | |
uses: actions/cache@v3 | |
env: | |
cache-name: test-python-packages | |
with: | |
path: '~/.local/**/site-packages' | |
key: ${{ runner.os }}-${{ matrix.python }}-${{ env.cache-name }}-${{ hashFiles('requirements/**/*.txt') }} | |
restore-keys: | | |
${{ runner.os }}-${{ matrix.python }}-${{ env.cache-name }}- | |
- name: Install bin dependencies | |
run: | | |
sudo apt-get -qq update | |
sudo apt-get -y install gdal-bin libgdal-dev libsqlite3-mod-spatialite | |
- name: Install python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install gdal==$(gdal-config --version) | |
pip install -r requirements/base.txt --user | |
pip install -r requirements/tests.txt --user | |
pip install -r requirements/lint.txt --user | |
- name: Check with black | |
run: | | |
python -m black --check generic_map_api | |
- name: Check with isort | |
run: | | |
python -m isort --check-only generic_map_api | |
- name: Check with pylint | |
run: | | |
./lint_all.sh | |
- name: Test with pytest | |
run: | | |
python -m pytest tests |