-
Notifications
You must be signed in to change notification settings - Fork 2
37 lines (35 loc) · 1.02 KB
/
python.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
name: Python
on: [push, pull_request]
jobs:
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-local-path: ${{ runner.temp }}/cache
- name: Set up Python
run: uv python install
- name: Install dependencies
run: uv sync
- name: Check formatting
run: bin/format
- name: Linting
run: bin/lint
- name: Run tests
run: bin/test -v --cov=registered --cov-fail-under=74 --cov-report=term --cov-report=html
env:
OSMNX_CACHE_DIR: ${{ runner.temp }}/cache/osmnx
- name: Check if coverage was reported
id: has-coverage
if: ${{ always() }}
run: test -d htmlcov && echo "exists=true" >> $GITHUB_STATE
- name: Upload coverage artifact
if: ${{ always() && steps.has-coverage.outputs.exists }}
uses: actions/upload-artifact@v4
with:
name: python-coverage-report
path: htmlcov/