Skip to content

Commit 0bd93bc

Browse files
committed
Create pipeline for tests and shellcheck
Closes: #29 Signed-off-by: Arthur Diniz <[email protected]>
1 parent e01d578 commit 0bd93bc

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/test.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
lint:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Install tools
19+
run: sudo apt-get update && sudo apt-get install -y shellcheck devscripts
20+
21+
- name: Run shellcheck
22+
run: shellcheck wcurl tests/*
23+
24+
- name: Run checkbashisms
25+
run: checkbashisms wcurl tests/*
26+
27+
test:
28+
runs-on: ${{ matrix.os }}
29+
strategy:
30+
matrix:
31+
os: [ubuntu-latest, macos-latest]
32+
steps:
33+
- name: Checkout repository
34+
uses: actions/checkout@v4
35+
36+
- name: Install shunit2
37+
run: |
38+
if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then
39+
sudo apt-get update
40+
sudo apt-get install -y shunit2
41+
elif [[ "${{ matrix.os }}" == "macos-latest" ]]; then
42+
brew install shunit2
43+
fi
44+
45+
- name: Run shunit2 tests
46+
run: ./tests/tests.sh

0 commit comments

Comments
 (0)