Skip to content

Use poetry-dynamic-versioning and pre-commit #16

Use poetry-dynamic-versioning and pre-commit

Use poetry-dynamic-versioning and pre-commit #16

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python package
on:
push:
branches: [develop]
pull_request:
branches: [develop]
jobs:
python:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
poetry-version: [1.7.1]
pandoc-version: [3.1.11.1]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Set up Poetry ${{ matrix.poetry-version }}
uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install dependencies
run: |
wget https://github.com/jgm/pandoc/releases/download/${{ matrix.pandoc-version }}/pandoc-${{ matrix.pandoc-version }}-1-amd64.deb
sudo dpkg -i ./pandoc-${{ matrix.pandoc-version }}-1-amd64.deb
poetry install
- name: Test with tox
run: |
poetry run tox -e py
poetry:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.12']
poetry-version: [1.2.2, 1.3.2, 1.4.2, 1.5.1, 1.6.1, 1.7.1]
pandoc-version: [3.1.11.1]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Set up Poetry ${{ matrix.poetry-version }}
uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install dependencies
run: |
wget https://github.com/jgm/pandoc/releases/download/${{ matrix.pandoc-version }}/pandoc-${{ matrix.pandoc-version }}-1-amd64.deb
sudo dpkg -i ./pandoc-${{ matrix.pandoc-version }}-1-amd64.deb
poetry install
- name: Test with tox
run: |
poetry run tox -e py
pandoc:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.12']
poetry-version: [1.7.1]
pandoc-version: [3.0.1, 3.1.11.1]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Set up Poetry ${{ matrix.poetry-version }}
uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install dependencies
run: |
wget https://github.com/jgm/pandoc/releases/download/${{ matrix.pandoc-version }}/pandoc-${{ matrix.pandoc-version }}-1-amd64.deb
sudo dpkg -i ./pandoc-${{ matrix.pandoc-version }}-1-amd64.deb
poetry install
- name: Test with tox
run: |
poetry run tox -e py
style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Set up Poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.7.1
- name: Install dependencies
run: |
poetry install
- name: Test with tox
run: |
poetry run tox -e style
poetry run tox -e linter
cov:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Set up Poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.7.1
- name: Install dependencies
run: |
wget https://github.com/jgm/pandoc/releases/download/3.1.11.1/pandoc-3.1.11.1-1-amd64.deb
sudo dpkg -i ./pandoc-3.1.11.1-1-amd64.deb
poetry install
- name: Test
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
poetry run tox -e coverage
poetry run pip install coveralls
poetry run coveralls