-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yaml
54 lines (49 loc) · 1.06 KB
/
Taskfile.yaml
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
---
version: 3
interval: 1000ms
output: group
vars:
bin_name: pull-requester
tasks:
default:
cmds:
- task: clean
- task: test
test:
desc: Run the unit tests for the scripts
aliases:
- t
sources:
- "bin/*"
- "lib/*.sh"
- "tests/*.bats"
- "tests/helpers/*.bash"
env:
BATS_LIB_PATH: lib:/usr/lib
cmds:
# Enter key to the same pane as it is running in so that it exits
# scrolling mode and starts refreshing the screen as new tests are run
- cmd: |-
test -n "$TMUX_PANE" && tmux send-keys -t $TMUX_PANE Enter
silent: true
- cmd: |-
bats --formatter pretty tests/
fmt:
desc: Properly format all the bash and bats files
aliases:
- f
sources:
- "bin/*"
- "lib/*.sh"
- "tests/*.bats"
cmds:
- cmd: |-
shfmt -i 2 -bn -ci -sr --diff \
bin/* lib/*.sh tests/*.bats
clean:
desc: Clean up temporary files and locations
aliases:
- c
run: once
cmds:
- cmd: rm -rf .task