Create pipeline to lint and test #5
Workflow file for this run
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
name: Test | ||
Check failure on line 1 in .github/workflows/test.yml GitHub Actions / TestInvalid workflow file
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | ||
cancel-in-progress: true | ||
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/* | ||
container: | ||
name: ${{ matrix.image }} | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ${{ matrix.image }} | ||
strategy: | ||
matrix: | ||
image: [debian:stable, debian:testing, debian:unstable, ubuntu:latest] | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Install curl and shunit2 | ||
run: | | ||
apt-get update | ||
apt-get install -y curl shunit2 | ||
- name: Run shunit2 tests | ||
run: ./tests/tests.sh | ||
macos: | ||
name: 'macos' | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Install shunit2 | ||
run: brew install shunit2 | ||
- name: Run shunit2 tests | ||
run: ./tests/tests.sh |