-
Notifications
You must be signed in to change notification settings - Fork 5
37 lines (34 loc) · 989 Bytes
/
build.yml
File metadata and controls
37 lines (34 loc) · 989 Bytes
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
# Builds the python environment; linter and formatting via ruff; type annotations via pyright;
# tests via pytest; reports test coverage via pytest-cov.
name: build
on:
push:
branches: ['*']
pull_request:
workflow_dispatch:
jobs:
build_run_tests:
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
if: github.event.pull_request.draft == false
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: [3.9, 3.12]
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: pip install -e .[dev]
- name: ruff
run: ruff check .
- name: pyright
run: pyright .
- name: pytest
run: pytest --cov harp