Skip to content

Python package template #1

Python package template

Python package template #1

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: pre-commit/action@1b06ec171f2f6faa71ed760c4042bd969e4f8b43
lint-docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
- name: Lint Dockerfile
uses: hadolint/hadolint-action@54c9adbab1582136bcea3692aa25b7a70191834f
with:
dockerfile: Dockerfile
test:
needs: [lint, lint-docker]
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
run: pipx install poetry
- name: Install dependencies
run: poetry install
- name: Run tests
run: poetry run pytest