Skip to content

Add log

Add log #252

Workflow file for this run

name: Package Testing
on:
push:
paths:
- 'src/**'
- 'tests/**'
- 'pyproject.toml'
- 'poetry.lock'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
jobs:
TestPackage:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
id: setup_python
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Set up Poetry
run: |
pip install poetry
- name: restore cached virtual environment
id: get-env
uses: actions/cache/restore@v4
with:
key: venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
path: .venv
- name: Install test dependencies
if: steps.get-env.outputs.cache-hit != 'true'
run: |
python -m venv .venv
source .venv/bin/activate
poetry install --with test
- name: cache virtual environment
if: steps.get-env.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
key: venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
path: .venv
- name: Check formatting and PEP8
run: |
poetry run isort --check-only src/tatm tests scripts
poetry run black --check src/tatm tests scripts
poetry run flake8 src/tatm tests scripts
- name: Run tests
run: |
poetry run pytest --cov=src/tatm --cov-fail-under=85 tests
BuildWheel:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
id: setup_python
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Set up Poetry
run: |
pip install poetry
- name: build
run: |
poetry build