-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (40 loc) · 1.58 KB
/
install.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
name: Install
on: [push, pull_request]
jobs:
install:
name: Install
runs-on: ubuntu-latest
steps:
- name: Check out the latest code
uses: actions/checkout@v2
# - name: run install script
# run: |
# alias wget="wget --no-check-certificate"
# sh -c "$(echo "alias wget=\"wget --no-check-certificate\""; yes | wget -qO- https://raw.githubusercontent.com/NUAA-Open-Source/safeu-cli/master/install.sh)"
- name: print install script help message
run: |
sh ./install.sh --help
# should not have safeu command
if [ -x "$(command -v safeu)" ]; then echo "should not have the safeu command"; exit 1; else exit 0; fi
- name: print install script version for safeu-cli
run: |
sh ./install.sh --version
# should not have safeu command
if [ -x "$(command -v safeu)" ]; then echo "should not have the safeu command"; exit 1; else exit 0; fi
- name: run install script
run: sh ./install.sh
- name: test safeu cli
run: safeu version
- name: remove the safeu cli
run: |
sudo rm -rf /usr/local/bin/safeu
# should not have safeu command
if [ -x "$(command -v safeu)" ]; then echo "should not have the safeu command"; exit 1; else exit 0; fi
- name: run install script with local option
run: |
export PATH=$HOME/.local/bin:$PATH
sh ./install.sh --local
- name: test safeu cli
run: |
export PATH=$HOME/.local/bin:$PATH
safeu version