2021-07-13 20:22:00 +03:00
|
|
|
name: Script unit tests
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
paths:
|
2021-10-29 22:48:21 +03:00
|
|
|
- "**.sh"
|
|
|
|
- "**.bats"
|
2021-07-13 20:22:00 +03:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
2021-10-29 22:48:21 +03:00
|
|
|
paths:
|
|
|
|
- "**.sh"
|
|
|
|
- "**.bats"
|
2021-07-13 20:22:00 +03:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
name: Run script unit tests
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
# This runs on Alpine to make sure we're testing with actual sh.
|
|
|
|
container: "alpine:3.14"
|
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2021-07-13 20:24:30 +03:00
|
|
|
- name: Install test utilities
|
|
|
|
run: apk add bats checkbashisms
|
|
|
|
|
|
|
|
- name: Check Bashisms
|
|
|
|
run: checkbashisms ./install.sh
|
2021-07-13 20:22:00 +03:00
|
|
|
|
|
|
|
- name: Run script unit tests
|
|
|
|
run: ./ci/dev/test-scripts.sh
|