Skip to content

Replace threshold dispatcher with direct functions (#6) #30

Replace threshold dispatcher with direct functions (#6)

Replace threshold dispatcher with direct functions (#6) #30

Workflow file for this run

name: CI
on:
push:
branches: [master]
tags: ['v*']
pull_request:
branches: [master]
env:
JAX_ENABLE_X64: "1"
jobs:
version-check:
if: "!startsWith(github.ref, 'refs/tags/')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Check version bump
run: |
pip install packaging tomli
python scripts/check_version.py
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: pyproject.toml
- name: Install dependencies
run: pip install -e ".[dev]"
- name: Lint
run: ruff check jaxwavelets/
- name: Format check
run: ruff format --check jaxwavelets/
- name: Test with coverage
run: |
pip install pytest-cov
pytest jaxwavelets/tests/ --cov=jaxwavelets --cov-report=xml --cov-report=term-missing -v --tb=short
- name: Upload coverage
if: matrix.python-version == '3.12'
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: false
build:
needs: [test]
if: always() && needs.test.result == 'success'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Build and check
run: |
pip install build twine
python -m build
twine check dist/*
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
publish:
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist/
- uses: pypa/gh-action-pypi-publish@release/v1