Skip to content

fix(deps): update dependency @types/node to v20.14.6 #771

fix(deps): update dependency @types/node to v20.14.6

fix(deps): update dependency @types/node to v20.14.6 #771

Workflow file for this run

name: 'Test PRs'
on:
pull_request:
paths:
- src/**
- package-lock.json
- template.yaml
- .github/workflows/node-pr.yml
permissions:
id-token: write
contents: read
pull-requests: read
jobs:
unit-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
- name: Install dependencies
run: npm ci
- name: Build project
run: npm run build
- name: Lint the code
run: npm run lint:json
- name: Run unit tests
run: npm run test:cov
- name: Retrieve package version
id: package-version
run: echo "version=$(jq -r '.version' package.json)" >> $GITHUB_OUTPUT
- name: Rewrite ESLint report for SonarCloud
run: sed -i "s+${GITHUB_WORKSPACE}+/github/workspace+g" eslint-report.json
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@v2.3.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.projectVersion=${{ steps.package-version.outputs.version }}
sam-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
- name: Install dependencies
run: npm ci
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: eu-central-1
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/ServerlessAppManagementAccess
role-duration-seconds: 1800
- name: Validate with SAM
run: sam validate
- name: Build with SAM
run: sam build