-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (76 loc) · 2.32 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
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: "0 0 * * *"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- name: Upgrade pip and install linters
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pydocstyle packaging
- name: flake8 PEP compliance checks
run: python -m flake8 lsbi tests
- name: pydocstyle documentation style checks
run: python -m pydocstyle --convention=numpy lsbi
sphinx:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Upgrade pip and install doc requirements
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[all,docs]"
- name: build documentation
run: |
cd docs
make clean
make html SPHINXOPTS="-W --keep-going -n"
pip:
env:
ZENODO_SANDBOX_TOKEN: ${{ secrets.ZENODO_SANDBOX_TOKEN }}
PR_NUMBER: ${{ github.event.number }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[test]"
- name: Test with pytest
run: python -m pytest --cov=lsbi tests
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
test-build-n-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install pypa/build
run: python -m pip install build --user
- name: Build a binary wheel and a source tarball
run: python -m build --sdist --wheel --outdir dist/
- name: Publish to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
continue-on-error: true
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true