-
Notifications
You must be signed in to change notification settings - Fork 1
88 lines (75 loc) · 2.12 KB
/
ci.yaml
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
name: CI
on: [push, pull_request]
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pybind11 setuptools coverage
- name: Install
run: python -m pip install .
- name: Test
run: coverage run -m unittest discover
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
docs:
needs: build-and-test
permissions:
pages: write
id-token: write
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/main' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pybind11 setuptools
- name: Install
run: pip install .[docs]
- name: Build documentation
run: |
sphinx-apidoc -o docs/source sortedl1
cd docs
make html
- name: Setup pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: "docs/build/html/"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
release:
if: ${{ github.ref == 'refs/heads/main' }}
needs:
- docs
- build-and-test
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
with:
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
release-type: python
package-name: sortedl1
bump-minor-pre-major: true