Skip to content

fix

fix #402

Workflow file for this run

name: testing
on:
push:
branches: [main, develop, rc]
pull_request:
branches: [main, develop]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install
run: |
uv pip install --system -e .[dev]
- name: Test with pytest
run: |
python -m pytest -v --cov=spgrep --cov-report=xml tests/
- name: Upload coverage to Codecov
if: matrix.python-version == '3.12'
uses: codecov/codecov-action@v5
with:
file: ./coverage.xml
flags: unittests
fail_ci_if_error: false
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
sudo apt-get install -y pandoc
- name: Install
run: |
uv pip install --system -e .[dev,docs]
- name: Build
run: |
sphinx-build docs docs_build
- name: Deploy docs at develop branch
if: ${{ github.ref == 'refs/heads/develop' }}
uses: peaceiris/actions-gh-pages@v4
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_dir: ./docs_build
destination_dir: develop