Skip to content

Test suite upgrade #100

Test suite upgrade

Test suite upgrade #100

Workflow file for this run

name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: "0 0 * * *"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'
- name: Upgrade pip and install linters
run: |
pip install --upgrade pip
pip install flake8 pydocstyle packaging
- name: flake8 PEP compliance checks
run: flake8 lsbi tests
- name: pydocstyle documentation style checks
run: pydocstyle --convention=numpy lsbi
sphinx:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'
- name: Upgrade pip and install doc requirements
run: |
pip install --upgrade pip
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@v4
- uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -e ".[test]"
- name: Test with pytest
run: 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@v4
- uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'
- name: Install pypa/build
run: 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