Skip to content

Commit f58814b

Browse files
committed
Add CI linters
1 parent 197f3ac commit f58814b

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/general-lint.yaml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Build and publish HPCS server image
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
types:
8+
- opened
9+
10+
jobs:
11+
general_lint:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Checking for newlines at the end of files
16+
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
17+
- name: Checking for trailing whitespaces
18+
run: if find . -type f -not -path './.git/*' -exec egrep -l " +$" {} \; | grep . ; then exit 1 ; fi
19+
20+
- name: Running shellcheck on *.sh files
21+
run: |
22+
find . -name .git -type d -prune -o -type f -name \*.sh -print0 |
23+
xargs -0 -r -n1 shellcheck
24+
helm_lint:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v2
28+
- name: run helm lint on hpcs-stack
29+
run: docker run --rm -v $(pwd)/k8s:/apps alpine/helm:latest lint hpcs-stack
30+
terraform_lint:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v2
34+
- name: run terraform fmt
35+
run: docker run --rm -v $(pwd):/data docker.io/hashicorp/terraform fmt -check /data/terraform

0 commit comments

Comments
 (0)