-
Notifications
You must be signed in to change notification settings - Fork 2
97 lines (85 loc) · 1.94 KB
/
tests.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Tests
on:
pull_request:
branches:
- master
paths-ignore:
- 'completion/**'
- 'doc/**'
- 'git-mr-completion.bash'
- 'LICENSE'
- 'README.md'
push:
branches:
- master
paths-ignore:
- 'completion/**'
- 'doc/**'
- 'git-mr-completion.bash'
- 'LICENSE'
- 'README.md'
jobs:
shellcheck:
name: ShellCheck
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Run ShellCheck
run: |
sudo apt-get update -y
sudo apt-get install shellcheck
LC_ALL=C.UTF-8 shellcheck git-mr
test:
name: Test
strategy:
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04
- windows-2019
runs-on: ${{ matrix.os }}
steps:
- name: Show versions
run: |
bash --version
git --version
- name: Setup BATS
uses: mig4/setup-bats@v1
with:
bats-version: 1.8.2
- name: Check out code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Run tests on ${{ matrix.os }}
run: bash -c "bats --print-output-on-failure --formatter tap ./test"
test-mac:
name: Test (Mac)
strategy:
matrix:
os:
- macos-11
- macos-12
runs-on: ${{ matrix.os }}
steps:
- name: Install dependencies
run: |
brew install \
bash \
gnu-sed \
grep
- name: Show versions
run: |
bash --version
git --version
- name: Setup BATS
uses: mig4/setup-bats@v1
with:
bats-version: 1.8.2
- name: Check out code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Run tests on ${{ matrix.os }}
run: bash -c "bats --print-output-on-failure --formatter tap ./test"