-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (38 loc) · 1.03 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
name: CI
on:
pull_request:
push:
branches:
- main
- "dev*"
jobs:
test:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: [3.8, 3.11]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Update pip and install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install ".[test]" pytest-sugar
- name: Run tests
run: |
python -m pytest --cov=centhesus --cov-fail-under=100 tests
- name: Install and run linters
if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.11
run: |
python -m pip install ".[lint]"
python -m black --check .
python -m ruff .