-
Notifications
You must be signed in to change notification settings - Fork 827
56 lines (46 loc) · 1.32 KB
/
ci.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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: "0 6 * * 1" # Every Monday at 06:00 UTC
jobs:
build:
name: Python ${{ matrix.python-version }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-latest]
defaults:
run:
shell: bash -elo pipefail {0}
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Create environment with Micromamba
uses: mamba-org/setup-micromamba@v1
with:
cache-downloads: true
cache-environment: true
create-args: python=${{ matrix.python-version }}
environment-file: tests/environments/env-ci.yml
post-cleanup: none
- name: Install OSMnx
run: |
pip install -e .
conda list
conda info --all
- name: Lint code
run: SKIP=no-commit-to-branch pre-commit run --all-files
- name: Test docs
run: make -C ./docs html
- name: Test code
run: pytest --cov=./osmnx --cov-report=xml --cov-report=term-missing --verbose
- name: Upload coverage report
uses: codecov/codecov-action@v3