Skip to content

Add basic CI setup (#3) #7

Add basic CI setup (#3)

Add basic CI setup (#3) #7

Workflow file for this run

name: Lint, Build, Test
on:
pull_request:
push:
branches:
- master
jobs:
lint-build:
name: Lint and build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: eifinger/setup-rye@v3
- name: Install dependencies
run: |
rye sync
- name: Spellcheck
run: |
rye run typos .
- name: Check format
run: |
rye fmt --check
rye run pyproject-fmt --check .
- name: Lint
run: |
rye lint
- name: Build
run: |
rye build
- uses: actions/upload-artifact@v4
with:
name: regdesc-build
path: dist/
test:
name: Test
needs: lint-build
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/download-artifact@v4
with:
name: regdesc-build
path: dist/
- name: Install test runner
run: |
pip install pytest
- name: Install source package
run: |
pip install dist/regdesc-*.tar.gz
- name: Test
run: |
pytest --pyargs regdesc.tests