Right now we are testing dotman for only Bash 4.x (which comes with Ubuntu 20.04. It would be nice to test it on bash 3 and 5 as well. For now, we only need to test syntax as done in the current workflow
name: build
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
linux-test:
name: Linux Test
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@master
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@0.5.0
- name: Syntax Testing
# -n : read commands but do not execute them. This may be used to check a shell script for syntax errors. This is ignored by interactive shells.
run : |
bash -n dotman.sh
sh -n tools/install.sh
Right now we are testing dotman for only Bash 4.x (which comes with Ubuntu 20.04. It would be nice to test it on bash 3 and 5 as well. For now, we only need to test syntax as done in the current workflow
This can be done using Bash's official Docker 🐬 Image. Also, this SO thread can help