Skip to content

Migrate to pyproject.toml #12

Migrate to pyproject.toml

Migrate to pyproject.toml #12

Workflow file for this run

name: Python package
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
lint:
name: "flake8 on code"
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: "Setup Python, Poetry and Dependencies"
uses: dsoftwareinc/setup-python-poetry-action@v1
with:
python-version: "3.12"
poetry-version: "1.8.3"
- name: Run flake8
shell: bash
run: |
poetry run flake8
test:
needs: [ lint ]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11", "3.12" ]
poetry-version: [ "1.8.3" ]
exclude:
- python-version: "3.7"
poetry-version: "1.8.3"
include:
- python-version: "3.7"
poetry-version: "1.5.1"
steps:
- uses: actions/checkout@v4
- name: "Setup Python, Poetry and Dependencies"
uses: dsoftwareinc/setup-python-poetry-action@v1
with:
python-version: ${{ matrix.python-version }}
poetry-version: ${{ matrix.poetry-version }}
- name: Test
run: |
poetry install --no-interaction
poetry run python -m unittest
test-with-coverage:
needs: [ test ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Setup Python, Poetry and Dependencies"
uses: dsoftwareinc/setup-python-poetry-action@v1
with:
python-version: "3.12"
poetry-version: "1.8.3"
- name: Test
run: |
poetry install --no-interaction
poetry run coverage run -m unittest
poetry run coverage report -m