Skip to content

Python package template #8

Python package template

Python package template #8

Workflow file for this run

name: CI
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
- uses: actions/setup-python@cfd55ca82492758d853442341ad4d8010466803a
- name: Run pre-commit
uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd
test:
needs: lint
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@cfd55ca82492758d853442341ad4d8010466803a
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
- name: Install Poetry
uses: snok/install-poetry@ff8a7d7de27005376176819789742a2280cc35e2
- name: Install dependencies
run: poetry install
- name: Run tests
run: poetry run pytest