Skip to content

Commit

Permalink
Merge pull request #11 from pelme/github-actions
Browse files Browse the repository at this point in the history
Add Github Actions
  • Loading branch information
pelme authored Apr 1, 2024
2 parents 5bfb8d5 + dd6133e commit a659faf
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 31 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
- run: pip install .[dev]
- run: pre-commit run --all-files

pytest:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- run: pip install .[dev]
- run: pytest

mypy:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- run: pip install .[dev]
- run: mypy

pyright:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- run: pip install .[dev]
- run: pyright
15 changes: 15 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
repos:
- repo: local
hooks:
- id: ruff lint
name: ruff
entry: ruff check --fix
language: system
types: [python]
require_serial: false
- id: ruff format
name: ruff
entry: ruff format
language: system
types: [python]
require_serial: false
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ classifiers = [
]
# Install with pip install .[dev]
optional-dependencies.dev = [
"pre-commit",
"flit",
"mypy",
"pyright",
Expand Down
6 changes: 0 additions & 6 deletions scripts/fix

This file was deleted.

25 changes: 0 additions & 25 deletions scripts/test

This file was deleted.

0 comments on commit a659faf

Please sign in to comment.