Skip to content

[SVLS-9359] clean up readme pt 2 #549

[SVLS-9359] clean up readme pt 2

[SVLS-9359] clean up readme pt 2 #549

Workflow file for this run

name: tests
on: push
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
- name: Set up Node 24
uses: actions/setup-node@f1f314fca9dfce2769ece7d933488f076716723e # v1.4.6
with:
node-version: 24
- name: Enable Corepack
run: corepack enable
- name: Cache Node modules
id: cache-node-modules
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4.2.1
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}-${{ matrix.working-dir }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn install --immutable
- name: Synthesize project files
run: yarn projen
- name: Anti-tamper check
run: |-
if ! git diff --exit-code; then
echo "Do not directly edit the project files generated by Projen. Add your changes to '.projenrc.ts' then run 'yarn projen'."
exit 1
fi
- name: Check formatting
run: yarn check-formatting
- name: Lint
run: yarn eslint
test:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
node-version: [22, 24]
steps:
- name: Checkout
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
- name: Set up Node ${{ matrix.node-version }}
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ matrix.node-version }}
- name: Enable Corepack
run: corepack enable
- name: Cache Node modules
id: cache-node-modules
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4.2.1
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}-${{ matrix.working-dir }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn install --immutable
- name: Run tests
run: yarn test
integration-tests:
needs: [lint, test]
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
- name: Set up Node 24
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version: 24
- name: Enable Corepack
run: corepack enable
- name: Cache Node modules
id: cache-node-modules
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4.2.1
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn install --immutable
- name: Build
run: yarn build
- name: Install CDK CLI
run: sudo npm install -g aws-cdk
- name: Install Packages
run: yarn projen
- name: Configure AWS credentials via OIDC (Build-Stable)
uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # v4.3.1
with:
role-to-assume: arn:aws:iam::486234852809:role/datadog-cdk-constructs-github-actions
aws-region: us-east-1
- name: Configure AWS credentials for Serverless Sandbox
uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # v4.3.1
with:
role-to-assume: arn:aws:iam::425362996713:role/gha-datadog-cdk-integration-test
aws-region: us-east-1
role-chaining: true
role-skip-session-tagging: true
- name: Run tests
run: ./scripts/run_integration_tests.sh