-
Notifications
You must be signed in to change notification settings - Fork 25
59 lines (52 loc) · 1.36 KB
/
ci-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
name: tests
on:
push:
branches:
- master
paths-ignore:
- '.gitignore'
- '**.md'
- '**.rst'
pull_request:
branches:
- master
paths-ignore:
- '.gitignore'
- '**.md'
- '**.rst'
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
python_version: [
3.8, # only lowest & highest version should be enough, :cross_fingers:
# 3.9,
# '3.10',
'3.11'
# pypy3 # didn't build on CI anymore, happy for help: https://github.com/gis-ops/routing-py/issues/60
]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
cache: pip
- uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Install dependencies
run: |
pip install -r requirements_dev.txt
- name: style & lint checks
run: |
pre-commit run --all-files --color=always
- name: pytest and coverage
run: |
pip install -e .
coverage run --source=routingpy --module pytest
coverage lcov --include "routingpy/*"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}