CI #317
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
# Trigger on push to any branch | |
push: | |
# Trigger on manual dispatch | |
workflow_dispatch: | |
# Trigger twice a month at 6:00 a.m. | |
schedule: | |
- cron: '0 6 */14 * *' | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 40 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
include: | |
- os: ubuntu-latest | |
install: | | |
sudo apt-get update | |
sudo apt install -y zsh vim git curl universal-ctags mupdf | |
- os: macos-latest | |
install: | | |
brew install zsh vim curl universal-ctags mupdf | |
steps: | |
- name: Install dependencies | |
run: ${{ matrix.install }} | |
- name: Build dotfiles | |
run: | | |
curl -Ls https://gist.github.com/dhnza/6b384f52ce32342761cc00f9d26311fa/raw/dotfiles-init.sh | /bin/bash | |
#TODO: add branch to script?? | |
git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME checkout ${GITHUB_REF##*/} | |
$HOME/.dotfiles-install.sh | |
- name: Check installation | |
shell: zsh {0} | |
run: | | |
set -e | |
# Check zsh plugins | |
#TODO: work around for zplug's pipe incompatibility | |
zsh <<< "source $HOME/.zshrc; zplug check --verbose" | |
# Check cargo packages | |
command -v cargo | |
command -v fd | |
command -v rg | |
command -v bat | |
command -v delta | |
command -v exa | |
command -v zoxide | |
command -v navi | |
# Check vim plugins | |
vim +PlugStatus +'w! /tmp/vim-plug.log' +qall <<< '\n' > /dev/null | |
cat /tmp/vim-plug.log | |
[[ 0 == $(awk '/Finished./ {print $2}' /tmp/vim-plug.log) ]] |