Skip to content

Commit

Permalink
updated req python version and created test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurDeclercq committed Dec 3, 2024
1 parent 72cebc0 commit dda40f1
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
48 changes: 48 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Test and Lint Workflow

on:
push:
branches:
- '*'
pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest

steps:
# Checkout the code from the repository
- name: Checkout code
uses: actions/checkout@v3

# Set up Python environment
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.10

# Install dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[dev] # Install both runtime and dev dependencies
# Run linting with ruff (this will catch print statements)
- name: Lint with ruff
run: |
pip install ruff # Ensure ruff is available if not installed through dev dependencies
ruff check mumble tests # Lint your package and test directories
# Run formatting checks with black
- name: Check formatting with black
run: |
pip install black # Ensure black is available if not installed through dev dependencies
black --check . # Check if code is correctly formatted
# Run tests with pytest
- name: Run tests with pytest
run: |
pip install pytest
pytest --disable-warnings -q
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dependencies = [
"psm_utils >= 0.9.0",
"numpy >= 1.23.0",
]
requires-python = ">=3.9"
requires-python = ">=3.10"

[project.optional-dependencies]
dev = ["ruff", "black", "pytest", "pre-commit", "bumpver"]
Expand Down

0 comments on commit dda40f1

Please sign in to comment.