Skip to content

Commit

Permalink
chore: Replace pre-commit with goose (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonagestam authored Jul 26, 2024
1 parent 436ec4a commit 9e0ff83
Show file tree
Hide file tree
Showing 19 changed files with 685 additions and 181 deletions.
27 changes: 19 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,24 @@ env:
jobs:
lint:
name: Static analysis
uses: less-action/reusables/.github/workflows/pre-commit.yaml@main
with:
python-version: "3.12"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.12
cache: pip
check-latest: true
- name: goose cache
uses: actions/cache@v4
with:
path: ~/.cache/goose
key: "${{ runner.os }}-goose-3.12-${{ hashFiles('.goose/**/manifest.json') }}"
restore-keys: |
${{ runner.os }}-goose-3.12
${{ runner.os }}-goose
- run: pip install git-goose
- run: python3 -m goose run --select=all --delete-orphan-environments

type-check:
name: Type check
Expand All @@ -37,11 +52,7 @@ jobs:
uses: actions/cache@v4
with:
path: .mypy_cache
key: >-
${{ runner.os }}
-mypy
-3.12
-${{ hashFiles('requirements.txt') }}
key: "${{ runner.os }}-mypy-3.12-${{ hashFiles('requirements.txt') }}"
restore-keys: |
${{ runner.os }}-mypy-3.12
${{ runner.os }}-mypy
Expand Down
1 change: 1 addition & 0 deletions .goose/check-manifest/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"source_dependencies":["check-manifest","setuptools-scm==8.1.0","setuptools==71.1.0","wheel==0.43.0"],"lock_files":[{"path":"requirements.txt","checksum":"sha256:8749b703c2c10ee6508cc3285d57c4bd5b44daa3fe6a844bf755e549ea7afe40"}],"checksum":"sha256:f3088465a7c13f8bcd9ca759210e41d5d09e65b6a1200f0136c49622936a59e5"}
23 changes: 23 additions & 0 deletions .goose/check-manifest/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
build==1.2.1 \
--hash=sha256:526263f4870c26f26c433545579475377b2b7588b6f1eac76a001e873ae3e19d \
--hash=sha256:75e10f767a433d9a86e50d83f418e83efc18ede923ee5ff7df93b6cb0306c5d4
check-manifest==0.49 \
--hash=sha256:058cd30057714c39b96ce4d83f254fc770e3145c7b1932b5940b4e3efb5521ef \
--hash=sha256:64a640445542cf226919657c7b78d02d9c1ca5b1c25d7e66e0e1ff325060f416
packaging==24.1 \
--hash=sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002 \
--hash=sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124
pyproject-hooks==1.1.0 \
--hash=sha256:4b37730834edbd6bd37f26ece6b44802fb1c1ee2ece0e54ddff8bfc06db86965 \
--hash=sha256:7ceeefe9aec63a1064c18d939bdc3adf2d8aa1988a510afec15151578b232aa2
setuptools-scm==8.1.0 \
--hash=sha256:42dea1b65771cba93b7a515d65a65d8246e560768a66b9106a592c8e7f26c8a7 \
--hash=sha256:897a3226a6fd4a6eb2f068745e49733261a21f70b1bb28fce0339feb978d9af3
wheel==0.43.0 \
--hash=sha256:465ef92c69fa5c5da2d1cf8ac40559a8c940886afcef87dcf14b9470862f1d85 \
--hash=sha256:55c570405f142630c6b9f72fe09d9b67cf1477fcf543ae5b8dcb1f5b7377da81

# WARNING: The following packages were not pinned, but pip requires them to be
# pinned when the requirements file includes hashes and the requirement is not
# satisfied by a package already installed. Consider using the --allow-unsafe flag.
# setuptools
1 change: 1 addition & 0 deletions .goose/node/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"source_dependencies":["prettier"],"lock_files":[{"path":"package-lock.json","checksum":"sha256:f4412caf2beed530362395e3e44258f75cc35e43e890f1e2f725f9bbda990f4c"},{"path":"package.json","checksum":"sha256:c5008cb00d6009f6d901cfe35523169a3deb91979b71fce65d6ac79fdace548b"}],"checksum":"sha256:a112173ffe8caaeb52381f7fef342a108d8d4b4e081310059c09786525de466c"}
26 changes: 26 additions & 0 deletions .goose/node/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .goose/node/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"lockfileVersion":3,"dependencies":{"prettier":"*"}}
1 change: 1 addition & 0 deletions .goose/python/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"source_dependencies":["blacken-docs","check-jsonschema","editorconfig-checker","pre-commit-hooks","ruff"],"lock_files":[{"path":"requirements.txt","checksum":"sha256:7afa7fcdc7615d74c49d1c8c2694e56fdf67c3f33031aa3e2cc708a131dc2165"}],"checksum":"sha256:12d32d65a454f2e9b3299a11d829a52a5b5fbafa74daea9515df2fd2140586ef"}
Loading

0 comments on commit 9e0ff83

Please sign in to comment.