-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (51 loc) · 1.51 KB
/
tests.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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