ci: sync configs to pymplate
- add python3.12 - add ruff
This commit is contained in:
parent
fabcbab751
commit
0512488241
9 changed files with 117 additions and 74 deletions
41
.ci/run
Executable file
41
.ci/run
Executable file
|
@ -0,0 +1,41 @@
|
|||
#!/bin/bash
|
||||
set -eu
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
cd .. # git root
|
||||
|
||||
if ! command -v sudo; then
|
||||
# CI or Docker sometimes doesn't have it, so useful to have a dummy
|
||||
function sudo {
|
||||
"$@"
|
||||
}
|
||||
fi
|
||||
|
||||
if [ -n "${CI-}" ]; then
|
||||
# install OS specific stuff here
|
||||
case "$OSTYPE" in
|
||||
darwin*)
|
||||
# macos
|
||||
brew install fd
|
||||
;;
|
||||
cygwin* | msys* | win*)
|
||||
# windows
|
||||
:
|
||||
;;
|
||||
*)
|
||||
# must be linux?
|
||||
sudo apt update
|
||||
sudo apt install fd-find
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
|
||||
PY_BIN="python3"
|
||||
# some systems might have python pointing to python3
|
||||
if ! command -v python3 &> /dev/null; then
|
||||
PY_BIN="python"
|
||||
fi
|
||||
|
||||
"$PY_BIN" -m pip install --user tox
|
||||
"$PY_BIN" -m tox --parallel --parallel-live "$@"
|
Loading…
Add table
Add a link
Reference in a new issue