Skip to content

Commit

Permalink
Add CI linters
Browse files Browse the repository at this point in the history
  • Loading branch information
j-kali committed Nov 19, 2024
1 parent 197f3ac commit f58814b
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/general-lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build and publish HPCS server image
on:
push:
branches:
- main
pull_request:
types:
- opened

jobs:
general_lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checking for newlines at the end of files
run: if (for file in $(find . -type f -not -path './.git/*') ; do [ "$(tail -c 1 < "${file}")" == "" ] || echo "${file} has no newline at the end..." ; done) | grep . ; then exit 1 ; fi
- name: Checking for trailing whitespaces
run: if find . -type f -not -path './.git/*' -exec egrep -l " +$" {} \; | grep . ; then exit 1 ; fi

- name: Running shellcheck on *.sh files
run: |
find . -name .git -type d -prune -o -type f -name \*.sh -print0 |
xargs -0 -r -n1 shellcheck
helm_lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: run helm lint on hpcs-stack
run: docker run --rm -v $(pwd)/k8s:/apps alpine/helm:latest lint hpcs-stack
terraform_lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: run terraform fmt
run: docker run --rm -v $(pwd):/data docker.io/hashicorp/terraform fmt -check /data/terraform

0 comments on commit f58814b

Please sign in to comment.