mirror of
https://gitea.blesmrt.net/mikaela/scripts.git
synced 2025-08-20 13:27:20 +02:00
Compare commits
3 Commits
ed4457b36e
...
2ac5a8396c
Author | SHA1 | Date | |
---|---|---|---|
2ac5a8396c | |||
2f8ecf0edb | |||
8169387dd2 |
17
.gitlab-ci.yml
Normal file
17
.gitlab-ci.yml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# Based on https://pre-commit.com
|
||||||
|
#image: python:alpine
|
||||||
|
image: pypy:latest
|
||||||
|
gitlab-ci-pre-commit:
|
||||||
|
stage: build
|
||||||
|
before_script:
|
||||||
|
#- apk add --no-cache git gcc musl-dev go
|
||||||
|
- pypy3 -m pip install pre-commit
|
||||||
|
script:
|
||||||
|
- pre-commit run --all-files --show-diff-on-failure
|
||||||
|
variables:
|
||||||
|
# Remember to gitignore .cache/**
|
||||||
|
PRE_COMMIT_HOME: ${CI_PROJECT_DIR}/.cache/pre-commit
|
||||||
|
TERM: dumb
|
||||||
|
cache:
|
||||||
|
paths:
|
||||||
|
- ${PRE_COMMIT_HOME}
|
20
bash/steamos-venv-pre-commit.bash
Executable file
20
bash/steamos-venv-pre-commit.bash
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# This is a noteish on how to pre-commit on SteamOS
|
||||||
|
set -x
|
||||||
|
|
||||||
|
cd ~
|
||||||
|
mkdir -p ~/.local/bin/
|
||||||
|
# My pre-commit configuration expects to find a pypy
|
||||||
|
ln -sf /usr/bin/python ~/.local/bin/pypy
|
||||||
|
ln -sf /usr/bin/python3 ~/.local/bin/pypy3
|
||||||
|
|
||||||
|
mkdir -p ~/venv
|
||||||
|
python3 -m venv ~/venv
|
||||||
|
. ~/venv/bin/activate
|
||||||
|
python3 -m pip install pip --upgrade
|
||||||
|
python3 -m pip install pre-commit --upgrade
|
||||||
|
# Removes duplicates from $PATH. Copied from https://unix.stackexchange.com/a/14896
|
||||||
|
PATH=$(echo "$PATH" | awk -v RS=':' -v ORS=":" '!a[$1]++{if (NR > 1) printf ORS; printf $a[$1]}')
|
||||||
|
printf "Remember to apply the following somewhere appropiate:\nPATH=$PATH"
|
||||||
|
|
||||||
|
set +x
|
@ -1 +1 @@
|
|||||||
Subproject commit 27fc7c6fbf06f0d32e5833736863d3455d1b8b8d
|
Subproject commit d970278eb14cc859b1e4911e9c4336e4ca50d6b8
|
@ -1 +1 @@
|
|||||||
Subproject commit f02731ffbbad3071dd55f500529d9235d5405a7b
|
Subproject commit 330fafa17ac70dfed5e116fb570fc04c9c9bb73e
|
Loading…
x
Reference in New Issue
Block a user