Skip to content

Commit

Permalink
Create pipeline for tests and shellcheck
Browse files Browse the repository at this point in the history
Closes: #29

Signed-off-by: Arthur Diniz <[email protected]>
  • Loading branch information
arthurbdiniz committed Dec 7, 2024
1 parent e01d578 commit 0bd93bc
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/test.yml
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:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install tools
run: sudo apt-get update && sudo apt-get install -y shellcheck devscripts

- name: Run shellcheck
run: shellcheck wcurl tests/*

- name: Run checkbashisms
run: checkbashisms wcurl tests/*

test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v4

- 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: ./tests/tests.sh

0 comments on commit 0bd93bc

Please sign in to comment.