Skip to content

refactor: add source_if_exists #283

refactor: add source_if_exists

refactor: add source_if_exists #283

Workflow file for this run

name: test dotfiles in linux
on:
push:
branches:
- master
- test/**
env:
TERM: xterm-256color
jobs:
one-liner-setup-test:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v2
- run: curl -sL dot.pandanoir.net | bash
- name: exists $HOME/dotfiles?
run: |
if ! [ -d $HOME/dotfiles ]; then exit 1; fi
echo $HOME/dotfiles exists
- name: exists fzf?
run: ~/.cache/fzf/bin/fzf --version
udpate-test:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v2
- run: curl -sL dot.pandanoir.net | bash
- run: rm ~/.config/zsh/.zshrc
- run: curl -sL dot.pandanoir.net | bash
- name: exists ~/.config/zsh/.zshrc?
run: if ! [ -f ~/.config/zsh/.zshrc ]; then exit 1; fi
neovim-setup-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install neovim
run: sudo snap install --beta nvim --classic
- run: nvim --version
- name: Run install.sh
run: |
ln -sf ${GITHUB_WORKSPACE} $HOME/dotfiles
${GITHUB_WORKSPACE}/install.sh
- name: check health of neovim
run: |
nvim --headless "+TSUpdateSync" "+lua require('mason-registry').refresh()" +q
nvim --headless "+checkhealth" "+w!health.log" +qa
cat health.log
echo '=============================='
if cat health.log | grep ERROR 2>&1; then
false
fi
- name: check mapping of vim
run: |
vim +'redir > map.log' \
+'silent map' \
+'silent map!' \
+'redir END' \
+'qa!'
cat map.log
echo
# 最低限 fd は使いたいのでチェックする
if ! cat map.log | grep -q -i 'i \+fd \+<esc>'; then
echo 'imap fd <ESC> is not available'
false
fi
zsh-setup-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: install zsh
run: sudo apt update; sudo apt install zsh
- name: Run install.sh
run: |
ln -sf ${GITHUB_WORKSPACE} $HOME/dotfiles
${GITHUB_WORKSPACE}/install.sh
shell: zsh {0}
- name: zsh
run: |
source $HOME/.zshenv
source $ZDOTDIR/.zshrc
zinit version
zinit report
shell: zsh {0}