-
Notifications
You must be signed in to change notification settings - Fork 12
121 lines (99 loc) · 2.88 KB
/
test.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
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: Test
on:
- push
- pull_request
jobs:
test_linux:
runs-on: ubuntu-latest
strategy:
max-parallel: 3
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Build wheel
run: |
python -m pip install build
python -m build .
- name: Test with pytest
run: |
pushd dist
python -m pip install pytest numpy scipy pandas refnx>=0.1.27
python -m pip install --only-binary=refellips --no-index --find-links=. refellips
pytest --pyargs refellips
popd
- uses: actions/upload-artifact@v4
with:
name: refellips-linux-${{ matrix.python-version }}
path: dist/
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Lint with black
run: |
python -m pip install black[jupyter] flake8
black --check -l80 refellips
black --check -l80 demos
black --check -l80 docs
flake8 --ignore=F401,E501,W504,W503,E203,E231,E402 --count --statistics refellips
build_doc:
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: setup apt dependencies
run: |
sudo apt-get update
sudo apt-get install pandoc
- name: Build documentation
run: |
python -m pip install --upgrade pip
python -m pip install .
python -m pip install wheel
cd docs
python -m pip install -r requirements.txt
make html
run_demos:
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Build wheel
run: |
python -m pip install build
python -m build .
- name: Install dependencies
run: |
pushd dist
python -m pip install pytest jupyter nbmake numpy matplotlib scipy pandas refnx>=0.1.27
python -m pip install --only-binary=refellips --no-index --find-links=. refellips
popd
- name: Run demos
run: |
pytest --nbmake ./demos