2
0
mirror of https://github.com/kazhala/dotbare synced 2024-11-17 21:25:32 +00:00

set up cicd for bats

This commit is contained in:
kevin zhuang 2020-05-13 13:23:36 +10:00
parent 6d71dfbbb3
commit 7f551db1d3
2 changed files with 15 additions and 0 deletions

View File

@ -12,6 +12,8 @@ teardown() {
&& [[ "${DOTBARE_TREE}" == "$HOME/.local/share/dotbare_test" ]]; then
rm -rf "${DOTBARE_TREE}"
fi
unset DOTBARE_DIR
unset DOTBARE_TREE
}
help() {

13
tests/fsetup.bats Executable file
View File

@ -0,0 +1,13 @@
#!/usr/bin/env bats
# inital setup in CI/CD pipeline
migrate() {
bash "${BATS_TEST_DIRNAME}"/../dotbare finit -u https://github.com/kazhala/dotfiles.git
}
@test "set up test environment" {
[[ -d "${DOTBARE_DIR}" ]] && skip
migrate
[ "${status}" -eq 0 ]
}