generated from scikit-learn-contrib/project-template
-
Notifications
You must be signed in to change notification settings - Fork 3
53 lines (41 loc) · 1.35 KB
/
main.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
name: Build, test and deploy
on: [push, pull_request, workflow_dispatch]
env:
PYTHONWARNINGS: all
jobs:
main:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python: [3.11, 3.12, 3.13]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements-dev.txt') }}-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-${{ hashFiles('requirements-dev.txt') }}-
- name: Install dependencies
run: pip install -r requirements.txt -r requirements-dev.txt
- name: Build package
run: pip install -e .
- name: Check formatting
run: black --check fuzzytree examples
- name: Run tests
run: pytest fuzzytree
- name: Build docs
if: matrix.os == 'ubuntu-latest' && matrix.python == 3.13
run: |
make -C doc/ html
touch doc/_build/html/.nojekyll
- name: Deploy docs
uses: JamesIves/github-pages-deploy-action@v4
if: matrix.os == 'ubuntu-latest' && matrix.python == 3.13
with:
branch: gh-pages
folder: doc/_build/html