Skip to content

Initial release: nrdax-python 0.1.0 #1

Initial release: nrdax-python 0.1.0

Initial release: nrdax-python 0.1.0 #1

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: test (py${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Lint (ruff)
run: ruff check src tests
- name: Format check (ruff)
run: ruff format --check src tests
- name: Type-check (mypy)
run: mypy
- name: Test (pytest + coverage)
run: pytest --cov=nrdax --cov-report=term-missing --cov-report=xml
- name: CLI smoke test
run: |
nrdax version
nrdax info
nrdax get NRDAX-T0006 --format json > /dev/null
nrdax search "rpc exhaustion" --format json > /dev/null
nrdax export --chain solana --format stix > /dev/null
nrdax cite NRDAX-T0006 --format bibtex > /dev/null
build:
name: build + metadata check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
- run: |
python -m pip install --upgrade pip build twine
python -m build
twine check dist/*
- name: Clean-install smoke test
run: |
python -m venv /tmp/clean
/tmp/clean/bin/pip install dist/*.whl
/tmp/clean/bin/nrdax version
/tmp/clean/bin/nrdax get NRDAX-T0006 --format json > /dev/null
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist/*
docs:
name: docs build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
- run: |
python -m pip install --upgrade pip
pip install -e ".[docs]"
mkdocs build --strict