Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Joseph Siddons
GeoSpatialTools
Commits
5eff666f
Commit
5eff666f
authored
1 month ago
by
Joseph Siddons
Browse files
Options
Download
Email Patches
Plain Diff
ci: add gitlab-ci and pre-commit-config files
parent
66b37c82
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
0 deletions
+68
-0
.gitlab-ci.yml
.gitlab-ci.yml
+52
-0
.pre-commit-config.yaml
.pre-commit-config.yaml
+16
-0
No files found.
.gitlab-ci.yml
0 → 100644
View file @
5eff666f
variables
:
UV_VERSION
:
0.5
PYTHON_VERSION
:
3.12
BASE_LAYER
:
bookworm-slim
UV_CACHE_DIR
:
.uv-cache
UV_SYSTEM_PYTHON
:
1
stages
:
-
build
-
test
-
lint
pre-commit
:
stage
:
build
image
:
python:3.11
script
:
-
pip install pre-commit
-
pre-commit run --all-files
rules
:
-
if
:
$CI_PIPELINE_SOURCE == "merge_request_event"
-
if
:
$CI_COMMIT_BRANCH == "main"
pytest
:
stage
:
test
image
:
ghcr.io/astral-sh/uv:$UV_VERSION-python$PYTHON_VERSION-$BASE_LAYER
cache
:
-
key
:
files
:
-
uv.lock
paths
:
-
$UV_CACHE_DIR
script
:
-
uv --version
-
uv sync --all-extras
-
uv pip list
-
uv run pytest test
rules
:
-
if
:
$CI_PIPELINE_SOURCE == "merge_request_event"
-
if
:
$CI_COMMIT_BRANCH == "main"
ruff
:
stage
:
lint
interruptible
:
true
image
:
name
:
ghcr.io/astral-sh/ruff:0.9.9-alpine
before_script
:
-
cd $CI_PROJECT_DIR
-
ruff --version
script
:
-
ruff check --output-format=gitlab > code-quality-report.json
artifacts
:
reports
:
codequality
:
$CI_PROJECT_DIR/code-quality-report.json
rules
:
-
if
:
$CI_PIPELINE_SOURCE == "merge_request_event"
-
if
:
$CI_COMMIT_BRANCH == "main"
This diff is collapsed.
Click to expand it.
.pre-commit-config.yaml
0 → 100644
View file @
5eff666f
repos
:
-
repo
:
https://github.com/pre-commit/pre-commit-hooks
rev
:
v5.0.0
hooks
:
-
id
:
end-of-file-fixer
-
id
:
trailing-whitespace
-
repo
:
https://github.com/astral-sh/ruff-pre-commit
rev
:
v0.8.5
hooks
:
-
id
:
ruff
args
:
[
--fix
]
-
id
:
ruff-format
-
repo
:
https://github.com/codespell-project/codespell
rev
:
v2.3.0
hooks
:
-
id
:
codespell
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment