Skip to content

Update release publishing mechanism #94

Update release publishing mechanism

Update release publishing mechanism #94

Workflow file for this run

name: Testing
on:
push:
branches:
- main
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Select Python 3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"
architecture: x64
- name: Install Dependencies
run: |
python -m pip install -U pip
python -m pip install wheel
python -m pip install poetry
poetry install
- name: Run black formatter check
run: poetry run black --check --diff toml_sort tests
- name: Run docformatter check
run: poetry run docformatter --check --recursive toml_sort tests
- name: Run isort check
run: poetry run isort --check toml_sort tests
- name: Run mypy check
run: poetry run mypy toml_sort
- name: Run pylint
run: poetry run pylint toml_sort tests
tests:
needs: [lint]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup, Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install Dependencies
run: |
python -m pip install -U pip
python -m pip install wheel
python -m pip install poetry
poetry install
- name: Run Tests
run: poetry run pytest tests
coverage:
needs: [lint]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Select Python 3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"
architecture: x64
- name: Install Dependencies
run: |
python -m pip install -U pip
python -m pip install wheel
python -m pip install poetry
poetry install
- name: Run Coverage
env:
WITH_COVERAGE: true
run: poetry run pytest --cov=toml_sort --cov-report=term-missing tests