diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 2859813..17fc16e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,3 +9,8 @@ updates: directory: "/" # Location of package manifests schedule: interval: "daily" + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml new file mode 100644 index 0000000..eb2a6b4 --- /dev/null +++ b/.github/workflows/links.yml @@ -0,0 +1,23 @@ +name: Links + +on: + push: + branches: ["main", "dev"] + pull_request: + branches: ["main", "dev"] + schedule: + - cron: "0 0 * * 1" + +permissions: + contents: read + +jobs: + linkChecker: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + + - name: Link Checker + uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 # v2 + with: + args: --verbose --no-progress './**/*.md' diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 22e0663..64b2462 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -5,6 +5,10 @@ on: branches: - main +permissions: + contents: write + pull-requests: read + jobs: update_release_draft: runs-on: ubuntu-latest diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 931dc65..0da3e57 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,8 +13,21 @@ on: - dev jobs: + prek: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + - name: Set up Python + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6 + with: + python-version: "3.14" + - name: Install prek + run: pip install prek==0.4.0 + - name: Run prek + run: prek run --all-files build: runs-on: ubuntu-latest + needs: prek strategy: matrix: python-version: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 249c70b..4a68668 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,12 +1,14 @@ +# .pre-commit-config.yaml default_install_hook_types: [pre-commit, pre-push] + repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.9.7 hooks: - id: ruff - args: - - --fix + args: [--fix] - id: ruff-format + - repo: https://github.com/codespell-project/codespell rev: v2.4.1 hooks: @@ -16,30 +18,33 @@ repos: - --skip="./.*,*.csv,*.json" - --quiet-level=2 exclude_types: [csv, json] + - repo: https://github.com/pre-commit/pre-commit-hooks rev: v5.0.0 hooks: - - id: check-executables-have-shebangs - stages: [manual] - - id: no-commit-to-branch - args: - - --branch=main - id: trailing-whitespace - id: end-of-file-fixer - - id: check-docstring-first - id: check-yaml - id: debug-statements + - id: check-docstring-first + - id: no-commit-to-branch + args: [--branch=main] + - id: check-executables-have-shebangs + stages: [manual] + - repo: https://github.com/adrienverge/yamllint.git rev: v1.35.1 hooks: - id: yamllint + - repo: https://github.com/prettier/prettier rev: 2.0.4 hooks: - id: prettier stages: [manual] + - repo: https://github.com/pre-commit/mirrors-mypy - rev: "v1.15.0" + rev: v1.15.0 hooks: - id: mypy files: ^openevsehttp/.+\.py$ diff --git a/requirements_lint.txt b/requirements_lint.txt index 1f74d2c..c9177ea 100644 --- a/requirements_lint.txt +++ b/requirements_lint.txt @@ -1,4 +1,4 @@ -r requirements.txt -pre-commit==4.6.0 +prek==0.4.0 ruff==0.15.13 mypy==2.1.0 diff --git a/requirements_test.txt b/requirements_test.txt index d620444..7fee740 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -1,5 +1,5 @@ -r requirements.txt -pre-commit==4.6.0 +prek==0.4.0 pytest==9.0.3 pytest-cov==7.1.0 pytest-timeout==2.4.0