41 lines
1.1 KiB
YAML
41 lines
1.1 KiB
YAML
name: check
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
validate:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install validation tools
|
|
run: sudo apt-get update && sudo apt-get install -y shellcheck tmux vim-nox
|
|
|
|
- name: Check shell scripts
|
|
run: |
|
|
bash -n install.sh uninstall.sh bash_tools.sh bash_tools/*.sh
|
|
shellcheck install.sh uninstall.sh bash_tools.sh bash_tools/*.sh
|
|
|
|
- name: Check Python
|
|
run: python3 -m compileall -q win-install.py
|
|
|
|
- name: Check Vim startup
|
|
run: vim -Nu "$PWD/.vimrc" -n -es -c 'doautocmd VimEnter' -c 'qa!'
|
|
|
|
- name: Check tmux configuration
|
|
run: |
|
|
tmux -L dotfiles-check -f "$PWD/.tmux.conf" new-session -d
|
|
tmux -L dotfiles-check kill-server
|
|
|
|
- name: Reject empty tracked files
|
|
shell: bash
|
|
run: |
|
|
while IFS= read -r -d '' file; do
|
|
[[ -s "$file" ]] || { echo "Empty tracked file: $file"; exit 1; }
|
|
done < <(git ls-files -z)
|