1
0
Fork 0

Fix tests

main
Ambrose Chua 2018-10-17 10:28:55 +08:00
parent 291b6f1140
commit 663fab198f
6 changed files with 30 additions and 7 deletions

View File

@ -34,6 +34,7 @@ USER ambrose
# install user programs
# shell config
RUN ./.install/dircolors.sh
RUN ./.install/pure.sh
RUN ./.install/thefuck.sh
RUN ./.install/zsh-autosuggestions.sh

View File

@ -17,6 +17,7 @@ pipeline:
group: test
image: alpine:latest
commands:
- ./.install/repositories.sh
- ./.install/neovim.sh
- nvim -version
- nvim +checkhealth +qa
@ -36,7 +37,7 @@ pipeline:
commands:
- ./.install/sudo.sh
- ./.install/thefuck.sh
- thefuck -v
- ./.local/bin/thefuck -v
when:
status: [ failure, success ]
test-yadm:
@ -45,13 +46,14 @@ pipeline:
commands:
- ./.install/sudo.sh
- ./.install/yadm.sh
- yadm version
- ./.local/bin/yadm version
when:
status: [ failure, success ]
test-golang:
group: test
image: alpine:latest
commands:
- ./.install/repositories.sh
- ./.install/golang.sh
- go version
- go get github.com/golang/example/hello
@ -62,6 +64,7 @@ pipeline:
group: test
image: alpine:latest
commands:
- ./.install/repositories.sh
- ./.install/node.sh
- node -e "console.log(process.versions)"
when:
@ -70,6 +73,7 @@ pipeline:
group: test
image: alpine:latest
commands:
- ./.install/repositories.sh
- ./.install/node.sh
- ./.install/yarn.sh
- yarn --version

9
.install/dircolors.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/sh
set -e
echo
echo "Downloading LS_COLORS..."
echo
wget https://raw.github.com/trapd00r/LS_COLORS/master/LS_COLORS -O ~/.dircolors

View File

@ -10,6 +10,7 @@ echo
sudo apk add --no-cache --virtual .build-deps \
curl
mkdir -p ~/.local/bin
curl -fLo ~/.local/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v$KUBECTL_VERSION/bin/linux/amd64/kubectl
chmod a+x ~/.local/bin/kubectl

View File

@ -14,6 +14,7 @@ sudo apk add --no-cache \
git \
bash
mkdir -p ~/.local/bin
curl -fLo ~/.local/bin/yadm https://github.com/TheLocehiliosan/yadm/raw/master/yadm
chmod a+x ~/.local/bin/yadm

17
.zshrc
View File

@ -4,7 +4,7 @@
# zsh settings
export SAVEHIST=10000
export HISTFILE=~/.zsh_history
export HISTFILE=$HOME/.zsh_history
setopt append_history
setopt extended_history
setopt share_history
@ -23,7 +23,10 @@ bindkey -v
bindkey '^R' history-incremental-search-backward
# zsh imports
fpath=( ~/.zsh/functions $fpath )
fpath=( $HOME/.zsh/functions $fpath )
# ls colors
eval $(dircolors -b $HOME/.dircolors)
# editor
export EDITOR=nvim
@ -35,7 +38,7 @@ autoload -U promptinit; promptinit
prompt pure
# autosuggestions
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
source $HOME/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
export ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=239'
export ZSH_AUTOSUGGEST_USE_ASYNC=true
bindkey '^e' autosuggest-accept
@ -50,11 +53,15 @@ export PATH="$(go env GOPATH)/bin:$PATH"
# aliases
alias vim=nvim
# iTerm2 shell integration
# gpg as ssh agent
test -e "$(which gpgconf)" && export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
# iTerm2 integration
test -e "$HOME/.iterm2_shell_integration.zsh" && source "$HOME/.iterm2_shell_integration.zsh"
# Hack to optionally get some oh-my-zsh back
# hack to optionally get some oh-my-zsh back
export ZSH="$HOME/.oh-my-zsh"
test -e "$HOME/.oh-my-zsh/plugins/osx/osx.plugin.zsh" && source "$HOME/.oh-my-zsh/plugins/osx/osx.plugin.zsh"
# legacy scripts
test -e "$HOME/.bin" && export PATH="$HOME/.bin:$PATH" # TODO: move to .local/bin
# tips