-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (43 loc) · 1.18 KB
/
verify.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
name: Verify
on: push
jobs:
static_checks:
name: Static Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: bash formatting
run: docker run -v "$PWD":/mnt -w /mnt mvdan/shfmt -ci -i 2 -l -d -- *.sh
- name: shellcheck
run: docker run -v "$PWD":/mnt -w /mnt koalaman/shellcheck -- *.sh test/*.bats
- name: misc files formatting
run: docker run -v "$PWD":/mnt -w /mnt tmknom/prettier --check .
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup BATS
uses: mig4/setup-bats@v1
with:
bats-version: 1.5.0
- name: Run Tests
run: bats --trace --print-output-on-failure test/
self_check:
name: Run this Action
runs-on: ubuntu-latest
needs: [static_checks, tests]
steps:
- uses: actions/checkout@v2
- uses: ./
with:
command: greet
who: world
- uses: ./
id: error_step
continue-on-error: true
with:
command: error
- name: ensure error command failed
if: steps.error_step.outcome == 'success'
run: exit 1