Skip to content

chore: add bats tests and update linter (#20) #52

chore: add bats tests and update linter (#20)

chore: add bats tests and update linter (#20) #52

Workflow file for this run

name: AllInOne
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
plugin_test:
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- name: asdf_plugin_test
uses: asdf-vm/actions/plugin-test@v1
with:
command: terraform-docs --version
version: 0.14.1
lint_and_tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Run the sh-checker
uses: luizm/action-sh-checker@v0.7.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#SHELLCHECK_OPTS: -e SC1004 # Optional: exclude some shellcheck warnings.
SHFMT_OPTS: -i 2 # Optional: pass arguments to shfmt.
with:
sh_checker_comment: true
- name: Install asdf
run: |
git clone https://github.com/asdf-vm/asdf.git $HOME/asdf
- name: Install bats
run: |
sudo apt-get install bats
bats --version
- name: Test plugin with bats
run: |
. $HOME/asdf/asdf.sh
asdf plugin-add terraform-docs $GITHUB_WORKSPACE
bats test