-
Notifications
You must be signed in to change notification settings - Fork 32
83 lines (71 loc) · 2.18 KB
/
Copy pathtest.yml
File metadata and controls
83 lines (71 loc) · 2.18 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
78
79
80
81
82
83
name: Tests
on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Setup micromamba
uses: mamba-org/setup-micromamba@4b9113af4fba0e9e1124b252dd6497a419e7396d # v1
with:
environment-file: environment-cpu.yml
environment-name: skala
cache-environment: true
cache-downloads: true
- name: Install package in development mode
run: |
pip install -e . --no-deps
shell: micromamba-shell {0}
- name: Run pre-commit hooks
run: |
pre-commit install
pre-commit run --all-files
shell: micromamba-shell {0}
- name: Run mypy
run: mypy .
shell: micromamba-shell {0}
test:
runs-on: ubuntu-latest
needs:
- lint
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
pyscf-version: ["2.9", "2.11"]
exclude: # Skip PySCF 2.11 on Python 3.12 because of multithreading crash when calling getints2c
- python-version: "3.12"
pyscf-version: "2.11"
name: "Python=${{ matrix.python-version }} & PySCF=${{ matrix.pyscf-version }}"
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Setup micromamba
uses: mamba-org/setup-micromamba@4b9113af4fba0e9e1124b252dd6497a419e7396d # v1
with:
environment-file: environment-cpu.yml
environment-name: skala
cache-environment: true
cache-downloads: true
create-args: >-
python=${{ matrix.python-version }}
pyscf=${{ matrix.pyscf-version }}
- name: Install package in development mode
run: |
pip install -e . --no-deps
shell: micromamba-shell {0}
- name: Run tests with coverage
run: >-
pytest
-v
--doctest-modules
--cov=skala --cov-report=xml --cov-report=term-missing --cov-report=html
--durations=50 --durations-min=1.0
--pyargs skala
tests/
shell: micromamba-shell {0}