-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create pipeline for tests and shellcheck
Closes: #29 Signed-off-by: Arthur Diniz <[email protected]>
- Loading branch information
1 parent
e01d578
commit a8dfeda
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
shellcheck: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install shellcheck | ||
run: | | ||
sudo apt-get update && sudo apt-get install -y shellcheck | ||
- name: Run shellcheck | ||
run: | | ||
shellcheck wcurl tests/* | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install shunit2 | ||
run: | | ||
if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then | ||
sudo apt-get update | ||
sudo apt-get install -y shunit2 | ||
elif [[ "${{ matrix.os }}" == "macos-latest" ]]; then | ||
brew install shunit2 | ||
fi | ||
- name: Run shunit2 tests | ||
run: | | ||
shunit2 ./tests/* |