Skip to content

Feature/packaging

Feature/packaging #14

Workflow file for this run

name: CI
on:
pull_request:
branches:
- master
types:
- opened
- synchronize
- closed
jobs:
setup:
runs-on: ubuntu-latest
outputs:
main-python-version: ${{ steps.setup-python.outputs.python-version }}
steps:
- uses: actions/checkout@v4
- name: Setup Python
id: setup-python
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Install Dependencies
run: |
pip install -e .
pip install -r requirements.txt
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
test-main-python:
needs: setup
runs-on: ubuntu-latest
steps:
- name: Unit Tests
run: coverage run -m pytest -s tests
- name: Test Coverage
run: coverage report --fail-under=96
- name: Pre-Commit Hooks
run: |
pre-commit install
pre-commit run --all-files
test-matrix:
needs: setup
runs-on: ubuntu-latest
steps:
- name: Run Test Matrix
run: tox run --skip-env ${{ needs.setup.steps.setup-python.outputs.python-version }}