Skip to content

Commit d562d96

Browse files
Copilotfelickz
andauthored
replace test.yaml with comprehensive CI workflow
Agent-Logs-Url: https://github.com/advanced-security/GSSAR/sessions/45293a25-2dba-411f-90bc-d83fb2592a5f Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
1 parent 186ac35 commit d562d96

File tree

1 file changed

+53
-17
lines changed

1 file changed

+53
-17
lines changed

.github/workflows/test.yaml

Lines changed: 53 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,65 @@
1-
name: Testing GSSAR
1+
name: CI
2+
permissions:
3+
contents: read
24
"on":
35
push:
46
branches:
57
- main
6-
- ft/**
7-
- bug/**
8-
- hotfix/**
9-
- release/**
108
pull_request:
119
branches:
1210
- main
13-
- ft/**
14-
- bug/**
15-
- hotfix/**
16-
- release/**
1711
jobs:
18-
LintCloudFormation:
19-
permissions:
20-
contents: read
12+
lint-and-format:
13+
name: Lint & Format Check
2114
runs-on: ubuntu-latest
2215
steps:
2316
- name: Checkout
24-
uses: actions/checkout@v2
25-
- name: Setup Cloud Formation Linter with Latest Version
17+
uses: actions/checkout@v4
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: "20"
22+
- name: Install dependencies
23+
run: yarn install --frozen-lockfile
24+
- name: Run Prettier check
25+
run: yarn run prettier-check
26+
- name: Run ESLint check
27+
run: yarn run lint-check
28+
29+
lint-cloudformation:
30+
name: CloudFormation Lint
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@v4
35+
- name: Setup CloudFormation Linter
2636
uses: scottbrenner/cfn-lint-action@v2
27-
- name: Print the Cloud Formation Linter Version & run Linter.
28-
run: |
29-
cfn-lint -t ./template.yml
37+
- name: Run CloudFormation Linter
38+
run: cfn-lint -t ./template.yml
39+
40+
build-functions:
41+
name: Build ${{ matrix.function }}
42+
runs-on: ubuntu-latest
43+
strategy:
44+
matrix:
45+
function:
46+
- functions/authorizers/githubWebhookIPValidator
47+
- functions/authorizers/githubWebhookSecretValidator
48+
- functions/helpers/getSecretDetails
49+
- functions/helpers/closeSecret
50+
- functions/helpers/githubIssueNotifier
51+
- functions/remediators/remediateAWSAccessKey
52+
- functions/remediators/remediateGoogleAPIKey
53+
steps:
54+
- name: Checkout
55+
uses: actions/checkout@v4
56+
- name: Setup Node.js
57+
uses: actions/setup-node@v4
58+
with:
59+
node-version: "20"
60+
- name: Install dependencies
61+
working-directory: ${{ matrix.function }}
62+
run: yarn install --frozen-lockfile
63+
- name: Build
64+
working-directory: ${{ matrix.function }}
65+
run: yarn run build

0 commit comments

Comments
 (0)