Bhupesh-V / dotman

dotman is a simple, elegant & easy to use dotfiles manager 🖖🏽
https://bhupesh-v.github.io/dotman
MIT License
106 stars 18 forks source link

test dotman on older/newer versions of bash #17

Open Bhupesh-V opened 3 years ago

Bhupesh-V commented 3 years ago

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   

This can be done using Bash's official Docker 🐬 Image. Also, this SO thread can help

fi-do commented 2 years ago

Hey,

I will work on it.

Best regards, fi-do