-
Notifications
You must be signed in to change notification settings - Fork 68
87 lines (73 loc) · 2.52 KB
/
Copy pathtest-server.yml
File metadata and controls
87 lines (73 loc) · 2.52 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
82
83
84
85
86
87
# Separate from the library CI (ci.yml) so the test-server directory is not
# swept into the coverage-gated library jobs.
name: ESDK TestServer (Node.js)
on:
pull_request:
paths:
- "test-server/**"
- ".github/workflows/test-server.yml"
push:
paths:
- "test-server/**"
- ".github/workflows/test-server.yml"
workflow_dispatch:
permissions:
contents: read
jobs:
javascript-language-server:
name: build + test (live modules)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22.x"
cache: "npm"
- name: Install dependencies
run: npm ci --unsafe-perm
- name: Build modules
run: npm run build-node
- name: Build server
working-directory: test-server
run: npx tsc -p tsconfig.json
- name: Test server
working-directory: test-server
run: npm test
# The complete cross-language TestServer run: `make test-server` clones the
# commons repo and orchestrates the full matrix with this working tree as the
# live JavaScript server. Runs on every pull_request/push; needs the
# CI_AWS_ROLE_ARN and COMMONS_REPO_TOKEN repo secrets.
test-server:
name: Cross-language TestServer run
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
env:
AWS_REGION: us-west-2
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22.x"
cache: "npm"
# The commons orchestrator (smithy-java) needs a JDK 21+
- name: Set up JDK 21 (Temurin)
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "21"
- name: Configure AWS credentials (branch-key-store account)
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ vars.ESDK_TEST_SERVER_KMS_ROLE_ARN || 'arn:aws:iam::370957321024:role/esdk-test-server-ci-kms-role' }}
aws-region: us-west-2
# The private commons clone (git@ URL from commons-configuration.json)
# picks up this SSH -> HTTPS+token mapping.
- name: Authenticate the commons clone
run: git config --global url."https://x-access-token:${{ secrets.COMMONS_REPO_PAT }}@github.com/".insteadOf "git@github.com:"
- name: Run the orchestrated TestServer
working-directory: test-server
run: make test-server