-
Notifications
You must be signed in to change notification settings - Fork 18
42 lines (40 loc) · 1.01 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
name: Tests
on:
pull_request:
branches:
- main
push:
branches:
- main
tags:
- '*'
jobs:
tests:
name: Test (${{ matrix.os }}, python ${{ matrix.pyversion }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
pyversion: ["3.x", "3.8"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.pyversion }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.pyversion }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff pytest pytest-cov
pip install -e .
- name: Lint with ruff
run: |
ruff format --check
ruff check
- name: Test with pytest
run: |
pytest --cov=src test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}