Skip to content

fix ci

fix ci #159

Workflow file for this run

name: ci
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install zsh
run: |
sudo apt-get update && sudo apt-get install zsh
- name: chezmoi install
run: |
echo "Install"
./install.sh
echo "home directory"
ls -a $HOME
echo "Valdiate that profile and .zshenv are created"
[[ -f "$HOME/.profile" ]] || exit 1
[[ -f "$HOME/.zshenv" ]] || exit 1
echo "config directory"
ls -a "$HOME/.config"
echo "Valdiate that git config and .zshrc are created"
[[ -f "$HOME/.config/git/config" ]] || exit 1
[[ -f "$HOME/.config/zsh/.zshrc" ]] || exit 1
echo "Valdiate user email from environment variable"
email=$(chezmoi data | jq -r '.user.email')
[[ "$email" == "test@taron.dev" ]] || exit 1
echo "Validate that Gnome files are excluded in CI"
[[ ! -f "$HOME/.config/user-dirs.dirs" ]] || exit 1
env:
GIT_AUTHOR_EMAIL: test@taron.dev
- name: test environment
run: |
echo ".profile"
cat "$HOME/.profile" && source "$HOME/.profile"
echo "Ensure an environment variable from .profile is set"
[[ -v GNUPGHOME ]] || exit 1
echo ".zshenv"
cat "$HOME/.zshenv" && source "$HOME/.zshenv"
echo "Ensure an environment variable from .zshenv is set"
[[ -v ZSH_CACHE_DIR ]] || exit 1
shell: zsh --errexit {0}