-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (34 loc) · 1020 Bytes
/
nodejs_ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Node.js CI
on:
workflow_dispatch: {}
push:
branches: [main]
pull_request:
branches: [main]
env:
AWS_REGION: us-west-2
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16, 18, 20, 22]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- run: npm run lint
if: ${{ matrix.node-version > 16 }}
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::471112959785:role/ew1-infra-github-actions-roles-CfnMonitorRole
role-session-name: actions-cfn-monitor
aws-region: ${{ env.AWS_REGION }}
- run: script -e -c "npm run test"