Skip to content

Commit

Permalink
feat: add terraform formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
nielm committed Sep 13, 2024
1 parent 847ff4f commit 0a6ad18
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/codehealth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,20 @@ jobs:
node-version: 22.4.1
check-latest: true

# Install eslint
- name: Use terraform
uses: hashicorp/setup-terraform@v3

- name: Install packages
working-directory: cloudrun-malware-scanner/
run: npm install

- name: ESlint
- name: Check ESlint
working-directory: cloudrun-malware-scanner/
run: npm run eslint

- name: Check Format
working-directory: cloudrun-malware-scanner/
run: npm run check-format -- --log-level warn
run: npm run check-format

- name: Typescript checks
working-directory: cloudrun-malware-scanner/
Expand All @@ -42,3 +44,11 @@ jobs:
- name: NPM Audit
working-directory: cloudrun-malware-scanner/
run: npm audit

- name: terraform validate infra
working-directory: terraform/infra/
run: terraform validate -no-color

- name: terraform validate service
working-directory: terraform/service/
run: terraform validate -no-color
5 changes: 4 additions & 1 deletion cloudrun-malware-scanner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
"description": "Service to scan GCS documents for the malware and move the analyzed documents to appropriate buckets",
"main": "index.js",
"scripts": {
"check-format": "prettier --config .prettierrc.js --check ..",
"check-format": "npm run prettier-check && npm run terraform-fmt-check",
"start": "node server.js",
"terraform-fmt": "terraform fmt ../terraform/*/*.tf ../terraform/*/*/*.tf",
"terraform-fmt-check": "terraform fmt -check ../terraform/*/*.tf ../terraform/*/*/*.tf",
"prettier": "prettier --config .prettierrc.js --write ..",
"prettier-check": "prettier --config .prettierrc.js --check --log-level=warn ..",
"start-proxy": "node gcs-proxy-server.js",
"test": "echo \"Error: no test specified\" && exit 1",
"eslint": "eslint *.js",
Expand Down

0 comments on commit 0a6ad18

Please sign in to comment.