diff --git a/.github/workflows/check-pre-commit.yaml b/.github/workflows/check-pre-commit.yaml new file mode 100644 index 0000000..bdd9dd1 --- /dev/null +++ b/.github/workflows/check-pre-commit.yaml @@ -0,0 +1,16 @@ +name: Check pre-commit +on: [push, pull_request] +jobs: + check_style: + runs-on: ubuntu-latest + steps: + - name: Checkout the repository + uses: actions/checkout@v6 + - name: Setup python + uses: actions/setup-python@v6 + with: + python-version: '3.x' + - name: Install pre-commit + run: pip install pre-commit + - name: Run checks + run: pre-commit run -a \ No newline at end of file diff --git a/.github/workflows/check-shell.yml b/.github/workflows/check-shell.yml deleted file mode 100644 index 3f6432a..0000000 --- a/.github/workflows/check-shell.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: Lint scripts -on: [push, pull_request] -jobs: - check_shell: - runs-on: ubuntu-latest - steps: - - name: Check out repository - uses: actions/checkout@v6 - - name: Lint shell scripts (shellcheck) - uses: ludeeus/action-shellcheck@master - with: - ignore: Vagrantfile diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..eee7ae0 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,6 @@ +repos: +- repo: https://github.com/koalaman/shellcheck-precommit + rev: v0.11.0 + hooks: + - id: shellcheck + args: [ --external-sources, --exclude=SC1091 ] \ No newline at end of file