From 88c43bacff96080d9f9bc65d284132853232bbc2 Mon Sep 17 00:00:00 2001 From: James Stevenson Date: Fri, 28 Feb 2025 09:59:13 -0500 Subject: [PATCH] more ci/cd --- .github/workflows/checks.yaml | 6 ++++-- .pre-commit-config.yaml | 3 ++- pyproject.toml | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 29b0834..d424af2 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -19,7 +19,7 @@ jobs: run: | python3 -m pip install ".[tests]" - # TODO -- build CI-ready tests + # TODO -- build CI-ready unit tests lint: name: lint @@ -36,12 +36,14 @@ jobs: run: python3 -m pip install ".[dev]" - name: Check style - run: python3 -m flake8 + run: python3 -m flake8 src tests precommit_hooks: runs-on: ubuntu-latest strategy: matrix: + - cmd: "check-ast" + - cmd: "debug-statements" - cmd: "end-of-file-fixer" - cmd: "trailing-whitespace" - cmd: "mixed-line-ending" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index db766c0..96beb06 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,7 +16,7 @@ repos: - id: end-of-file-fixer #Makes sure files end in a newline and only a newline - id: trailing-whitespace - id: mixed-line-ending - + args: [ --fix=lf ] - repo: local hooks: - id: run_tests @@ -33,3 +33,4 @@ repos: # language: system # types: [python] # exclude: ^venv/ ^.git/ ^.vscode/ ^.DS_Store +minimum_pre_commit_version: 4.0.1 \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 4b39223..f81f753 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,8 +42,8 @@ tests = [ ] dev = [ "flake8", - "pre-commit", "black", + "pre-commit>=4.0.1", ] [project.urls] @@ -72,4 +72,4 @@ vrs_anvil_toolkit = ["**/*.yaml"] [tool.setuptools_scm] [tool.pytest.ini_options] -filterwarnings = ["ignore::DeprecationWarning"] +filterwarnings = ["ignore::DeprecationWarning"] \ No newline at end of file