-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (47 loc) · 1.25 KB
/
Copy pathci.yml
File metadata and controls
56 lines (47 loc) · 1.25 KB
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
name: CI
on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint:
name: ShellCheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install shellcheck
run: sudo apt-get install -y shellcheck
- name: Lint git-wt
run: shellcheck bin/git-wt
- name: Lint install.sh
run: shellcheck install.sh
test:
name: Smoke test
needs: lint
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Verify help output
run: |
chmod +x bin/git-wt
bin/git-wt help
- name: Verify version output
run: bin/git-wt version | grep -q "git-wt"
- name: Test add/list/remove in a repo
run: |
cd "$(mktemp -d)"
git init -b main
git config user.name "CI"
git config user.email "ci@test"
git commit --allow-empty -m "init"
export PATH="$GITHUB_WORKSPACE/bin:$PATH"
git-wt add test-branch
git-wt list | grep -q "test-branch"
git-wt path test-branch
git-wt remove test-branch --delete-branch
git-wt prune