Skip to content

Add importable elements from hrepr.elements #56

Add importable elements from hrepr.elements

Add importable elements from hrepr.elements #56

name: Python package
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.12']
steps:
- name: Check out the code
uses: actions/checkout@v3
- name: Install rye
uses: eifinger/setup-rye@v4
- name: Pin Python version
run: rye pin ${{ matrix.python-version }}
- name: Sync dependencies
run: rye sync
- name: Lint check
run: rye check
- name: Check formatting
run: rye format --check
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
steps:
- name: Check out the code
uses: actions/checkout@v3
- name: Install rye
uses: eifinger/setup-rye@v4
- name: Pin Python version
run: rye pin ${{ matrix.python-version }}
- name: Sync dependencies
run: rye sync
- name: Test with pytest
run: rye run pytest --cov=src --cov-report term-missing
- name: Verify coverage
if: ${{ matrix.python-version == '3.12' }}
run: rye run coverage report | tail -1 | egrep "TOTAL +[0-9]+ +0 +100%"