|
1 | | -name: Testing GSSAR |
| 1 | +name: CI |
| 2 | +permissions: |
| 3 | + contents: read |
2 | 4 | "on": |
3 | 5 | push: |
4 | 6 | branches: |
5 | 7 | - main |
6 | | - - ft/** |
7 | | - - bug/** |
8 | | - - hotfix/** |
9 | | - - release/** |
10 | 8 | pull_request: |
11 | 9 | branches: |
12 | 10 | - main |
13 | | - - ft/** |
14 | | - - bug/** |
15 | | - - hotfix/** |
16 | | - - release/** |
17 | 11 | jobs: |
18 | | - LintCloudFormation: |
19 | | - permissions: |
20 | | - contents: read |
| 12 | + lint-and-format: |
| 13 | + name: Lint & Format Check |
21 | 14 | runs-on: ubuntu-latest |
22 | 15 | steps: |
23 | 16 | - 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 |
26 | 36 | 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