Skip to content

Commit

Permalink
add initial support for Github actions and pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ACea15 committed Sep 10, 2024
1 parent 8fada41 commit ca0dc0f
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Test with pytest
run: |
pip install pytest pytest-cov
pytest tests.py --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html
24 changes: 24 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# To install the git pre-commit hooks run:
# pre-commit install --install-hooks
# To update the versions:
# pre-commit autoupdate
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.6.4
hooks:
# Run the linter.
- id: ruff
args: [--fix, --show-fixes]
# Run the formatter.
- id: ruff-format
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "1.5.2"
hooks:
- id: pyproject-fmt
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
exclude: '.*\.pth$'
- id: debug-statements

0 comments on commit ca0dc0f

Please sign in to comment.