-
Notifications
You must be signed in to change notification settings - Fork 5
77 lines (75 loc) · 2.08 KB
/
ci.yml
File metadata and controls
77 lines (75 loc) · 2.08 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: CI Checks
on: [push]
jobs:
autoformat:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run black to test code linting
uses: psf/black@stable
with:
options: "--check --verbose"
jupyter: true
- name: Run isort to organize imports
uses: isort/isort-action@master
linting:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: "pyproject.toml"
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install the project
run: uv sync --all-extras --dev
- name: Lint
run: |
uv run pytest . --pylint -m pylint --pylint-rcfile=.pylintrc
static-type-checking:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: "pyproject.toml"
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install the project
run: uv sync --all-extras --dev
- name: Mypy
run: |
uv run mypy .
unit-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
steps:
- name: Install LAPACK and BLAS
run: |
sudo apt-get update
sudo apt-get install -y liblapack-dev libblas-dev
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: "pyproject.toml"
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install the project
run: uv sync --all-extras --dev
- name: Pytest
run: |
uv run pytest tests/