Skip to content

change daily job to process latest events #2273

change daily job to process latest events

change daily job to process latest events #2273

name: ✳️ Test and validate iac and lambdas
on:
pull_request:
workflow_call:
workflow_dispatch:
jobs:
test-and-validate:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Node setup
uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
- name: Install node packages
run: npm ci
# js and ts
- name: JS/TS linting and formatting
run: npm run lint:check
- name: Run lambda tests
run: npm run test
# iac
- name: IaC formatting checks
run: npm run iac:format:check
- name: Script formatting checks
run: npm run scripts:format:check
- name: SAM setup
uses: aws-actions/setup-sam@v2
with:
use-installer: true
version: 1.116.0
- name: IaC linting checks
run: npm run iac:lint
- name: Check out checkov hooks repository code
uses: actions/checkout@v4
with:
repository: govuk-one-login/devplatform-checkov-hook
token: ${{ secrets.CHECKOUT_REPO_PAT }}
path: devplatform-checkov-hook
- name: Checkov actions scan
uses: bridgecrewio/checkov-action@v12
with:
config_file: .checkov.ci.yml
directory: iac-dist
quiet: true
# scripts
- name: Script formatting checks
run: npm run scripts:format:check