-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
54 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,54 @@ | ||
name: Tests | ||
|
||
# Controls when the action will run. | ||
|
||
on: [push, pull_request, workflow_dispatch] | ||
|
||
jobs: | ||
changelog: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Check that PR is mentioned in Changelog | ||
run: | | ||
if ! ./.github/workflows/check_pr_label.sh "${{github.event.pull_request.number}}" "no changelog"; then | ||
grep "#${{github.event.pull_request.number}}" docs/CHANGELOG.md | ||
fi | ||
if: ${{github.event.pull_request}} | ||
shellcheck: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Run shellcheck | ||
run: | | ||
sudo apt-get update -y | ||
sudo apt-get install shellcheck | ||
./shellcheck.sh | ||
linux: | ||
strategy: | ||
matrix: | ||
os: ['ubuntu-20.04', 'ubuntu-22.04'] | ||
env_vars: | ||
- '' | ||
# allow for some parallelity without GNU parallel, since it is not installed by default | ||
- 'BATS_NO_PARALLELIZE_ACROSS_FILES=1 BATS_NUMBER_OF_PARALLEL_JOBS=2' | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Run test on OS ${{ matrix.os }} | ||
shell: 'script -q -e -c "bash {0}"' # work around tty issues | ||
env: | ||
TERM: linux # fix tput for tty issue work around | ||
run: | | ||
bash --version | ||
bash -c "time ${{ matrix.env_vars }} bin/bats --print-output-on-failure --formatter tap test" | ||
bash-version: | ||
strategy: | ||
matrix: | ||
version: ['3.2', '4.0', '4.1', '4.2', '4.3', '4.4', '4', '5.0', '5.1', '5', 'latest'] | ||
env_vars: | ||
- '' | ||
# also test running (recursively!) in parallel | ||
- '-e BATS_NUMBER_OF_PARALLEL_JOBS=2' |