Skip to content

Fix docs (#51)

Fix docs (#51) #146

Workflow file for this run

name: xrscipy CI
on:
push:
pull_request:
release:
types: [released]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.9', '3.10', '3.11', '3.12']
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python -
poetry config virtualenvs.in-project true
- name: Install dependencies
run: |
poetry install
- name: Run pre-commit
run: |
. .venv/bin/activate
pre-commit run --all-files --show-diff-on-failure
- name: Run Flake8
run: |
poetry run flake8 xrscipy --count --ignore=E203,E501,W503,W605 --show-source --statistics --exclude=**/__init__.py
- name: Run Tests
run: |
poetry run pytest tests --cov=xrscipy --cov-config=.coveragerc --cov-report=xml --cov-report=term-missing
- name: Build docs
if: matrix.python-version == '3.11'
run: |
. .venv/bin/activate
sphinx-build -n -b html source build
- name: publish to pypi
if: github.event_name == 'release' && github.event.release.target_commitish == 'main' && matrix.python-version == '3.11'
run: poetry publish --build --username __token__ --password ${{ secrets.PYPI_API_TOKEN }}