Skip to content

main

main #30

Workflow file for this run

name: main
on:
push:
paths-ignore: [ "docs/**" ]
branches: [ main ]
pull_request:
paths-ignore: [ "docs/**" ]
branches: [ main ]
schedule:
- cron: '45 18 3 * *'
jobs:
tests:
name: ${{ matrix.os }} / ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.10"]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: curl -sSL https://install.python-poetry.org | python3 - -y
- name: Update PATH
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install dependencies
run: poetry install --with dev
- name: Check formatting
run: poetry run black --check --quiet .
- name: Lint with flake8
run: |
poetry run flake8 ./sampdist/* \
--count --select=E9,F63,F7,F82 --show-source --statistics
poetry run flake8 ./sampdist/* --max-line-length=100 \
--ignore=E501,F401 --max-complexity=10 --count --exit-zero
- name: Check typing
run: poetry run mypy .
- name: Run tests with coverage
run: poetry run coverage run -m pytest -q
- name: Make coverage report
run: poetry run coverage report