1
0

ci: introduce

This commit is contained in:
Konstantin Demin 2024-02-20 09:35:34 +03:00
parent af26648283
commit d05065f3aa
Signed by: krd
GPG Key ID: 1F33CB0BA4731BC6
2 changed files with 35 additions and 0 deletions

View File

@ -6,6 +6,7 @@
!/.config/dotfiles/gitignore !/.config/dotfiles/gitignore
!/.config/dotfiles/install.sh !/.config/dotfiles/install.sh
!/.config/dotfiles/scripts/.keep !/.config/dotfiles/scripts/.keep
!/.config/dotfiles/woodpecker.yml
!/.config/htop/htoprc.example !/.config/htop/htoprc.example
!/.config/mc/ini.example !/.config/mc/ini.example
!/.config/zsh/_.zsh !/.config/zsh/_.zsh

View File

@ -0,0 +1,34 @@
steps:
- name: check
image: debian:bookworm-slim
environment:
DEBCONF_NONINTERACTIVE_SEEN: "true"
DEBIAN_FRONTEND: noninteractive
DEBIAN_PRIORITY: critical
TERM: linux
MALLOC_ARENA_MAX: "4"
commands:
- |
: # install required packages
apt-get -y update
apt-get -y install file findutils git shellcheck zsh
apt-get -y clean
- |
: # verify that repo doesn't contain "garbage"
find_fast() {
find "$@" -printf . -quit | grep -Fq .
}
if find_fast ./ -type f -name '*.zwc' ; then
echo 'found *.zwc' >&2
find ./ -type f -name '*.zwc'
exit 1
fi
- |
: # try zsh compile
git ls-files | sort -uV | xargs -r file -N -i | grep text/x-shellscript | cut -d: -f1 \
| xargs -r -n1 zsh -efc 'zcompile -UR "$@"' --
find ./ -type f -name '*.zwc' -delete
- |
: # try shellcheck (except for *.zsh)
git ls-files | grep -Fv '.zsh' | sort -uV | xargs -r file -N -i | grep text/x-shellscript | cut -d: -f1 \
| xargs -r -n1 shellcheck