resolve #81, #82 #15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
push: | |
branches: | |
- main # Trigger on push to 'main' branch (change this if using a different branch) | |
pull_request: | |
branches: | |
- main # Trigger on PR to 'main' branch | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.12" # Specify the Python version | |
# Install pre-commit | |
- name: Install pre-commit | |
run: | | |
python -m pip install --upgrade pip | |
pip install pre-commit | |
# Install dependencies | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
# Install pre-commit hooks | |
- name: Install pre-commit hooks | |
run: pre-commit install | |
# Run pre-commit hooks | |
- name: Run pre-commit hooks | |
run: pre-commit run --all-files | |
- name: Run tests | |
run: | | |
pytest *.py |