diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..b2e53df --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,21 @@ +name: CI + +on: + pull_request: + push: + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install shellcheck + run: sudo apt-get update && sudo apt-get install -y shellcheck + - name: Run shellcheck + run: | + find . -name '*.sh' -print0 | xargs -0 shellcheck + - name: Check bash syntax + run: | + for f in $(find . -name '*.sh'); do + bash -n "$f" + done diff --git a/README.md b/README.md index 4cdd3eb..5ebc911 100644 --- a/README.md +++ b/README.md @@ -33,3 +33,8 @@ simply typing: utils ``` + +## Continuous Integration + +Pull requests run a simple workflow that lints all shell scripts with [ShellCheck](https://www.shellcheck.net/) and checks their syntax with `bash -n`. This helps ensure that installation scripts remain valid without running the heavier installers like Airbyte. +