Skip to content

Commit

Permalink
Python package GitHub Action.
Browse files Browse the repository at this point in the history
  • Loading branch information
peteradrichem committed Jan 4, 2025
1 parent 4bd5427 commit 9cb1e40
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python package

on:
push:
branches: [ "py3k" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: ["3.9", "3.11", "3.13"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[test]
- name: Lint checks (Ruff)
run: |
ruff check --output-format=github --diff
- name: Import sort checks (isort)
run: |
isort --check --diff .
- name: Formatting checks (Black)
run: |
black --check --diff .
- name: Typing checks (mypy)
run: |
mypy .

0 comments on commit 9cb1e40

Please sign in to comment.