-
Notifications
You must be signed in to change notification settings - Fork 353
81 lines (80 loc) · 2.64 KB
/
Copy pathci.yml
File metadata and controls
81 lines (80 loc) · 2.64 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: CI
on:
pull_request:
workflow_dispatch:
jobs:
CI:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
node: [22, 24, 26]
steps:
- uses: actions/checkout@v7
- name: Setup Node.js environment
uses: actions/setup-node@v7
with:
node-version: ${{ matrix.node }}
- name: Install SDK
run: npm ci
- name: Run Build
run: npm run build
- name: Run Examples Builds
run: |
cd examples/typescript/
npm install
npm run build
- name: Run Linter
run: npm run lint
- name: Run Unit Tests
run: npm run test:unit
- name: Run TypeScript Tests
run: npm run test:typescript
- name: Run Build Tests
run: |
npm run clean
npm run build
npm run test:build
Integration:
# Fork PRs cannot assume the AWS OIDC role used to fetch credentials.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
continue-on-error: false
runs-on: ${{ matrix.os }}
permissions:
id-token: write
contents: read
strategy:
fail-fast: false
max-parallel: 1
matrix:
os: [ubuntu-latest, macos-latest]
node: [22, 24, 26]
steps:
- uses: actions/checkout@v7
- name: Setup Node.js environment
uses: actions/setup-node@v7
with:
node-version: ${{ matrix.node }}
- name: Install SDK
run: npm ci
- name: Configure AWS credentials (OIDC)
uses: aws-actions/configure-aws-credentials@v6
with:
role-to-assume: arn:aws:iam::082972943155:role/oidc-github-dropbox-dropbox-sdk-js-repo
aws-region: us-west-2
- name: Get integration credentials from AWS Secrets Manager
uses: aws-actions/aws-secretsmanager-get-secrets@v3
with:
secret-ids: |
CREDS,api-sdk-integration-test-creds
parse-json-secrets: true
- name: Run Integration Tests
env:
SCOPED_USER_CLIENT_ID: ${{ env.CREDS_SCOPED_USER_CLIENT_ID }}
SCOPED_USER_CLIENT_SECRET: ${{ env.CREDS_SCOPED_USER_CLIENT_SECRET }}
SCOPED_USER_REFRESH_TOKEN: ${{ env.CREDS_SCOPED_USER_REFRESH_TOKEN }}
SCOPED_TEAM_CLIENT_ID: ${{ env.CREDS_SCOPED_TEAM_CLIENT_ID }}
SCOPED_TEAM_CLIENT_SECRET: ${{ env.CREDS_SCOPED_TEAM_CLIENT_SECRET }}
SCOPED_TEAM_REFRESH_TOKEN: ${{ env.CREDS_SCOPED_TEAM_REFRESH_TOKEN }}
DROPBOX_SHARED_LINK: ${{ env.CREDS_DROPBOX_SHARED_LINK }}
run: npm run test:integration