11name : Test
22
3- on : [push, pull_request, workflow_dispatch]
3+ on : [ push, pull_request, workflow_dispatch ]
44
55jobs :
66 py_build_deps :
@@ -14,17 +14,17 @@ jobs:
1414 working-directory : light-curve
1515
1616 steps :
17- - uses : actions/checkout@v4
18- with :
19- submodules : true
20- - name : Set up Python 3.12
21- uses : actions/setup-python@v5
22- with :
23- python-version : " 3.12"
24- - name : Extract build deps from pyproject.toml
25- id : extract_from_toml
26- run : |
27- echo "output="$(python -c 'import tomllib; print(" ".join(tomllib.load(open("pyproject.toml", "rb"))["build-system"]["requires"]))') >> "$GITHUB_OUTPUT"
17+ - uses : actions/checkout@v4
18+ with :
19+ submodules : true
20+ - name : Set up Python 3.12
21+ uses : actions/setup-python@v5
22+ with :
23+ python-version : " 3.12"
24+ - name : Extract build deps from pyproject.toml
25+ id : extract_from_toml
26+ run : |
27+ echo "output="$(python -c 'import tomllib; print(" ".join(tomllib.load(open("pyproject.toml", "rb"))["build-system"]["requires"]))') >> "$GITHUB_OUTPUT"
2828
2929
3030 test :
@@ -33,47 +33,47 @@ jobs:
3333 strategy :
3434 fail-fast : false
3535 matrix :
36- python_minor : ['8', '9', '10', '11', '12']
36+ python_minor : [ '8', '9', '10', '11', '12' ]
3737
3838 defaults :
3939 run :
4040 working-directory : light-curve
4141
4242 steps :
43- - uses : actions/checkout@v4
44- with :
45- submodules : true
46- - name : Set up Python 3.${{ matrix.python_minor }}
47- uses : actions/setup-python@v5
48- with :
49- python-version : " 3.${{ matrix.python_minor }}"
50- - name : Install tox
51- run : pip install tox
52- - name : Run Python tests
53- run : tox -e py3${{ matrix.python_minor }}
43+ - uses : actions/checkout@v4
44+ with :
45+ submodules : true
46+ - name : Set up Python 3.${{ matrix.python_minor }}
47+ uses : actions/setup-python@v5
48+ with :
49+ python-version : " 3.${{ matrix.python_minor }}"
50+ - name : Install tox
51+ run : pip install tox
52+ - name : Run Python tests
53+ run : tox -e py3${{ matrix.python_minor }}-base,py3${{ matrix.python_minor }}-test
5454
5555 cargo-fmt :
5656 runs-on : ubuntu-latest
5757
5858 steps :
59- - uses : actions/checkout@v4
60- - run : cargo fmt --manifest-path=light-curve/Cargo.toml -- --check
59+ - uses : actions/checkout@v4
60+ - run : cargo fmt --manifest-path=light-curve/Cargo.toml -- --check
6161
6262 cargo-clippy :
6363 runs-on : ubuntu-latest
6464
6565 steps :
66- - uses : actions/checkout@v4
67- - uses : Swatinem/rust-cache@v2
68- with :
69- shared-key : " ${{ runner.os }}_stable-rust_cargo-clippy"
70- workspaces : " light-curve"
71- - run : cargo clippy --manifest-path=light-curve/Cargo.toml --all-targets -- -D warnings
66+ - uses : actions/checkout@v4
67+ - uses : Swatinem/rust-cache@v2
68+ with :
69+ shared-key : " ${{ runner.os }}_stable-rust_cargo-clippy"
70+ workspaces : " light-curve"
71+ - run : cargo clippy --manifest-path=light-curve/Cargo.toml --all-targets -- -D warnings
7272
7373 coverage :
7474 runs-on : ubuntu-latest
7575
76- needs : [py_build_deps]
76+ needs : [ py_build_deps ]
7777
7878 defaults :
7979 run :
@@ -117,7 +117,7 @@ jobs:
117117 benchmarks :
118118 runs-on : ubuntu-latest
119119
120- needs : [py_build_deps]
120+ needs : [ py_build_deps ]
121121
122122 steps :
123123 - uses : actions/checkout@v4
@@ -147,63 +147,63 @@ jobs:
147147 msrv-build :
148148 runs-on : ubuntu-latest
149149
150- needs : [py_build_deps]
150+ needs : [ py_build_deps ]
151151
152152 defaults :
153153 run :
154154 working-directory : light-curve
155155
156156 steps :
157- - uses : actions/checkout@v4
158- - name : Set up Python 3.8
159- uses : actions/setup-python@v5
160- with :
161- python-version : ' 3.8'
162- - name : Set up Python 3.9
163- uses : actions/setup-python@v5
164- with :
165- python-version : ' 3.9'
166- - name : Set up Python 3.10
167- uses : actions/setup-python@v5
168- with :
169- python-version : ' 3.10'
170- - name : Set up Python 3.11
171- uses : actions/setup-python@v5
172- with :
173- python-version : ' 3.11'
174- - name : Set up Python 3.12
175- uses : actions/setup-python@v5
176- with :
177- python-version : ' 3.12'
178- - name : Get minimum supported Rust version
179- run : echo "::set-output name=msrv::$(grep '^rust-version = ' Cargo.toml | grep -o '[0-9.]\+')"
180- id : get_msrv
181- - uses : dtolnay/rust-toolchain@master
182- with :
183- toolchain : ${{ steps.get_msrv.outputs.msrv }}
184- - uses : Swatinem/rust-cache@v2
185- with :
186- shared-key : " ${{ runner.os }}_msrv-rust_maturin-build"
187- workspaces : " light-curve"
188- - name : Install build_deps
189- run : pip install "${{ needs.py_build_deps.outputs.output }}"
190- - name : Build
191- run : |
192- rustup default ${{ steps.get_msrv.outputs.msrv }}
193- maturin build --find-interpreter
157+ - uses : actions/checkout@v4
158+ - name : Set up Python 3.8
159+ uses : actions/setup-python@v5
160+ with :
161+ python-version : ' 3.8'
162+ - name : Set up Python 3.9
163+ uses : actions/setup-python@v5
164+ with :
165+ python-version : ' 3.9'
166+ - name : Set up Python 3.10
167+ uses : actions/setup-python@v5
168+ with :
169+ python-version : ' 3.10'
170+ - name : Set up Python 3.11
171+ uses : actions/setup-python@v5
172+ with :
173+ python-version : ' 3.11'
174+ - name : Set up Python 3.12
175+ uses : actions/setup-python@v5
176+ with :
177+ python-version : ' 3.12'
178+ - name : Get minimum supported Rust version
179+ run : echo "::set-output name=msrv::$(grep '^rust-version = ' Cargo.toml | grep -o '[0-9.]\+')"
180+ id : get_msrv
181+ - uses : dtolnay/rust-toolchain@master
182+ with :
183+ toolchain : ${{ steps.get_msrv.outputs.msrv }}
184+ - uses : Swatinem/rust-cache@v2
185+ with :
186+ shared-key : " ${{ runner.os }}_msrv-rust_maturin-build"
187+ workspaces : " light-curve"
188+ - name : Install build_deps
189+ run : pip install "${{ needs.py_build_deps.outputs.output }}"
190+ - name : Build
191+ run : |
192+ rustup default ${{ steps.get_msrv.outputs.msrv }}
193+ maturin build --find-interpreter
194194
195195 arm :
196- runs-on : [self-hosted, linux, ARM64]
196+ runs-on : [ self-hosted, linux, ARM64 ]
197197
198- needs : [py_build_deps]
198+ needs : [ py_build_deps ]
199199
200200 defaults :
201201 run :
202202 working-directory : light-curve
203203
204204 steps :
205- - uses : actions/checkout@v4
206- - name : Install build_deps
207- run : pip install "${{ needs.py_build_deps.outputs.output }}"
208- - name : Build
209- run : maturin build
205+ - uses : actions/checkout@v4
206+ - name : Install build_deps
207+ run : pip install "${{ needs.py_build_deps.outputs.output }}"
208+ - name : Build
209+ run : maturin build
0 commit comments