-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.yml
74 lines (70 loc) · 1.92 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Bash
language: shell
os: linux
dist: xenial
'on':
pull_request:
types:
- synchronize
- opened
- reopened
- ready_for_review
paths:
- Main/ripple.sh
- Main/tmux.sh
jobs:
lint:
runs-on: ubuntu-latest
container: 'debian:stable'
steps:
- name: Installing dependencies..
run: >
# Sync repos
# Check for git
if ! apt list --installed 2>/dev/null | grep -qP "^git\/stable.*";
then
# Check if we can install git
if ! apt list | grep -qP "^git\/stable.*"; then
apt update
elif apt list | grep -qP "^git\/stable.*"; then
true
else
exit 255
fi
# Install git
apt install -y git
elif apt list --installed 2>/dev/null | grep -qP "^git\/stable.*";
then
true
else
exit 255
fi
# Check for shellcheck
if ! apt list --installed 2>/dev/null | grep -qP
"^shellcheck\s{1}-.*"; then
# Check if we can install shellcheck
if ! apt list | grep -qP "^shellcheck\s{1}-.*"; then
apt update
elif apt list | grep -qP "^shellcheck\s{1}-.*"; then
true
else
exit 255
fi
# Install shellcheck
apt install -y shellcheck
elif apt list --installed 2>/dev/null | grep -qP
"^shellcheck\s{1}-.*"; then
true
else
exit 255
fi
- name: Checking for execution error(s)..
shell: bash
run: |
cd "$GITHUB_WORKSPACE"/Main
./ripple.sh -h | exit 1
- name: Checking for shellcheck error(s)..
shell: bash
run: |
cd "$GITHUB_WORKSPACE"/Main
shellcheck --external-sources --shell=bash ripple.sh | exit 1