refactor: Remove context class, back to raw dictionaries #415
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint and test nnbench | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
lint: | |
name: Run code checks and formatting hooks | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v3 | |
- name: Install Python 3.10 interpreter | |
run: uv python install 3.10 | |
- name: Install the project | |
run: uv sync --extra dev | |
- name: Run pre-commit checks | |
run: uvx pre-commit run --all-files --verbose --show-diff-on-failure | |
test: | |
name: Test nnbench on ${{ matrix.os }} on Python ${{ matrix.python-version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-latest, macos-latest, windows-latest ] | |
python-version: [ "3.10", 3.11, 3.12, 3.13 ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v3 | |
- name: Install Python ${{ matrix.python-version }} | |
run: uv python install ${{ matrix.python-version }} | |
- name: Install the project in developer mode | |
run: uv sync --extra dev | |
- name: Execute python tests | |
run: uv run pytest -s | |
docs: | |
name: Publish latest documentation for nnbench | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v3 | |
- name: Install Python 3.11 interpreter | |
run: uv python install 3.11 | |
- name: Install the project | |
run: uv sync --extra docs | |
- name: Build documentation using mike | |
uses: ./.github/actions/mike-docs | |
with: | |
version: latest | |
pre_release: true # include pre-release notification banner | |
push: ${{ github.ref == 'refs/heads/main' }} # build always, publish on 'main' only to prevent version clutter |