-
Notifications
You must be signed in to change notification settings - Fork 116
61 lines (49 loc) · 1.39 KB
/
tests.yml
File metadata and controls
61 lines (49 loc) · 1.39 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
# This workflow runs the repo's CI tests.
name: tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
name: Python ${{ matrix.python-version }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
defaults:
run:
shell: bash -elo pipefail {0}
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Create environment with Micromamba
uses: mamba-org/setup-micromamba@v2
with:
cache-environment: true
create-args: python=${{ matrix.python-version }}
environment-file: tests/environment-dev.yml
- name: Install pynamical
run: |
python -m pip install .
python -m pip check
micromamba list
python -m pip show pynamical
- name: Lint code
run: |
isort . --check-only
black . --line-length 100 --check --diff
flake8 .
pydocstyle .
- name: Test docs
run: make -C ./docs html
- name: Test code
run: |
coverage run --source ./pynamical --module pytest --verbose
coverage xml -i
coverage report -m
- name: Upload coverage report
uses: codecov/codecov-action@v1