Skip to content

Commit

Permalink
Create python-checks.yml
Browse files Browse the repository at this point in the history
Use Github Actions to automatically type check and test new commits and pull requests.
  • Loading branch information
liffiton authored Jun 19, 2024
1 parent e2b134a commit 9eb6c7f
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/python-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Python type checks and tests

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

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]

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 wheel
pip install -e .[test]
- name: Type check with mypy
run: |
mypy
- name: Test with pytest
run: |
pytest

0 comments on commit 9eb6c7f

Please sign in to comment.