-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (73 loc) · 2.27 KB
/
ci.yml
File metadata and controls
76 lines (73 loc) · 2.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: dotfiles-CI
on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{github.ref}}-${{github.head_ref}}-ci
cancel-in-progress: true
jobs:
Dotfiles:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: marchdf/dotfiles
path: dotfiles
- name: Dependencies
run: |
bash ./dotfiles/bin/executable_install_bootstrap_dependencies.sh
curl -sS https://webi.sh/shfmt | sh
if [[ "$RUNNER_OS" == "Linux" ]]; then
sudo apt-get update && sudo apt-get install -y shellcheck
else
brew install shellcheck bash
fi
shell: bash
- name: Add local bin to PATH
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Clone dotfiles
run: |
mkdir -p "$HOME/.local/share/chezmoi"
git config --global --add safe.directory "$HOME/.local/share/chezmoi"
git clone --depth 1 --branch "${{ github.head_ref || github.ref_name }}" https://github.com/marchdf/dotfiles.git "$HOME/.local/share/chezmoi"
- name: Lint shell scripts
run: |
bash "$HOME/.local/share/chezmoi/bin/chezmoi_shell_linter.sh"
- name: Install
run: |
chezmoi init --source="$HOME/.local/share/chezmoi" --promptBool test_machine=t,"Use ZSH_ROOT_DIR for tmux shell"=f --promptString email=""
chezmoi data
chezmoi apply
- name: Cold start zsh
env:
TERM: xterm-256color
run: |
time zsh -i -c exit
- name: Warm start zsh
env:
TERM: xterm-256color
run: |
time zsh -i -c exit
- name: Verify tools
env:
TERM: xterm-256color
DISABLE_AUTO_TITLE: true
shell: zsh {0}
run: |
source ~/.zshrc
for TOOL in python pyenv uv poetry zoxide fzf bat; do
if [[ ! $(type ${TOOL} 2>/dev/null) ]]; then
echo "${TOOL} not found!"
exit 1
else
echo "${TOOL} found: $(${TOOL} --version 2>&1 | head -n1)"
fi
done