Add CI workflow

This commit is contained in:
Ilan Cosman 2020-07-10 20:07:00 -07:00
parent 69356d4a15
commit 6bb2225a89
3 changed files with 31 additions and 5 deletions

22
.github/workflows/CI.yaml vendored Normal file
View File

@ -0,0 +1,22 @@
name: CI
on: [push, pull_request]
jobs:
tests:
runs-on: ubuntu-20.04
steps:
# Checks-out repository under $GITHUB_WORKSPACE
- uses: actions/checkout@v2
- name: Install dependencies
run: sudo apt install -y fish curl git
- name: Install Tide as dev unattended
shell: fish {0}
run: source "$GITHUB_WORKSPACE/tools/tide_install.fish" && tide_install -ldu "$GITHUB_WORKSPACE"
- name: Run all tests
shell: fish {0}
run: tide_test -a

View File

@ -6,6 +6,8 @@ function tide_test
return 0
end
set -lx TERM xterm # Necessary for testing purposes ensures color codes are printed
set -l testsDir "$__fish_config_dir/tests"
set -l pending '/tmp/tide_test'
@ -32,11 +34,6 @@ function tide_test
end
end
if test -e $passed
printf '%s\n' '--------PASSED--------'
cat $passed
rm $passed
end
if test -e $failed
printf '%s\n' '--------FAILED--------'
cat $failed
@ -44,6 +41,11 @@ function tide_test
set returnStatement 1
end
if test -e $passed
printf '%s\n' '--------PASSED--------'
cat $passed
rm $passed
end
if test -e $pending
rm $pending

View File

@ -6,6 +6,8 @@ function tide_actual_install
set location 'master'
end
set -gx TERM xterm # Necessary for testing purposes, ensures color codes are printed
printf '%s\n' 'Installing tide theme...'
# -----------------Download Files-----------------