Skip to content

Merge pull request #43 from open-mpic/ds-dcv-slight-decoupling #79

Merge pull request #43 from open-mpic/ds-dcv-slight-decoupling

Merge pull request #43 from open-mpic/ds-dcv-slight-decoupling #79

Workflow file for this run

name: Hatch Unit Test
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11.9"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Set up pip cache
if: runner.os == 'Linux'
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }}
restore-keys: ${{ runner.os }}-pip-
- name: Install Hatch
run: pipx install hatch
- name: Submodule update
run: "git submodule init; git submodule update"
- name: Run tests
run: hatch run test:unit
- name: Check coverage
run: "hatch run test:coverage | grep TOTAL | python -c $'import sys\\nfor line in sys.stdin: \\n coverage = int([s for s in line.split(\" \") if s != \"\"][-1].strip()[:-1])\\n print(coverage)\\n exit(1 if coverage < 94 else 0)'"