-
Notifications
You must be signed in to change notification settings - Fork 4
41 lines (34 loc) · 822 Bytes
/
test.yml
File metadata and controls
41 lines (34 loc) · 822 Bytes
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
name: Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- name: Run shellcheck
run: |
if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then
sudo apt-get install shellcheck
else
brew install shellcheck
fi
shellcheck -S error bin/gh-switch lib/*.sh
- name: Make install.sh executable
run: chmod +x install.sh
- name: Test installation
run: |
./install.sh
gh-switch --version
- name: Test commands
run: |
gh-switch init
echo -e "\n\n\n\n" | gh-switch add test
gh-switch list
gh-switch current