Repository navigation
151 lines (127 loc) · 4.88 KB
/
Copy pathtest-server.yml
File metadata and controls
151 lines (127 loc) · 4.88 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
name: Run TestServer Tests
on:
workflow_call:
# Optional inputs that can be provided when calling this workflow
inputs:
python-version:
description: "Python version to use"
default: "3.11"
required: false
type: string
jobs:
test-server:
runs-on: macos-15-xlarge
permissions:
id-token: write
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
submodules: false
token: ${{ secrets.PAT_FOR_SPEC }}
# There are a lot of submodules here
# This initializes the checkouts in parallel (--jobs)
# rather than in series the way actions/checkout@v6 does it.
- name: Get CPU count
id: cpu-count
run: echo "count=$(node -p 'require("os").cpus().length')" >> $GITHUB_OUTPUT
- name: Setup git submodules with PAT
run: |
git config --global url."https://github.com/".insteadOf "git@github.com:"
git config --global credential.helper store
echo "https://x-token-auth:${{ secrets.PAT_FOR_SPEC }}@github.com" > ~/.git-credentials
- name: Optimize git for performance
run: |
git config --global fetch.parallel ${{ steps.cpu-count.outputs.count }}
git config --global submodule.fetchJobs ${{ steps.cpu-count.outputs.count }}
git config --global remote.origin.tagOpt --no-tags
- name: Checkout submodules with --jobs
run: |
git submodule update --init --depth 1 --single-branch --jobs ${{ steps.cpu-count.outputs.count }} test-server/
- name: Update cpp submodules recursively with --jobs
run: |
git submodule update --init --recursive \
--depth 1 --single-branch \
--jobs ${{ steps.cpu-count.outputs.count }} \
--force \
test-server/cpp-v2-transition-server/aws-sdk-cpp \
test-server/cpp-v3-server/aws-sdk-cpp
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.4.7"
bundler-cache: true
- name: Set up PHP with Composer
uses: shivammathur/setup-php@verbose
with:
php-version: "8.2"
- name: Install PHP V2 Transition dependencies
working-directory: ./test-server/php-v2-transition-server
shell: bash
run: composer install
- name: Install PHP V3 dependencies
working-directory: ./test-server/php-v3-server
shell: bash
run: composer install
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.25
- name: Install C++ dependencies
run: |
brew install libmicrohttpd nlohmann-json ossp-uuid
# Cache Gradle dependencies and build outputs
- name: Cache Gradle packages
uses: actions/cache@v5
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
test-server/java-tests/.gradle
key: ${{ runner.os }}-gradle-${{ hashFiles('test-server/java-tests/**/gradle-wrapper.properties', 'test-server/java-tests/**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v6
with:
special-characters-workaround: "true"
role-to-assume: arn:aws:iam::370957321024:role/S3EC-Python-Github-test-role
aws-region: us-west-2
- name: Build the servers
run: cd test-server && make build-all-servers
env:
MAKEFLAGS: -j${{ steps.cpu-count.outputs.count }}
AWS_REGION: us-west-2
- name: Start the servers
run: cd test-server && make start-all-servers
env:
AWS_REGION: us-west-2
TEST_SERVER_S3_BUCKET: ${{ vars.TEST_SERVER_S3_BUCKET }}
TEST_SERVER_KMS_KEY_ARN: ${{ vars.TEST_SERVER_KMS_KEY_ARN }}
- name: Wait for servers to start
run: cd test-server && make wait-all-servers
env:
MAKEFLAGS: -j${{ steps.cpu-count.outputs.count }}
- name: Run run-tests
run: cd test-server && make test-servers-run-tests
env:
AWS_REGION: us-west-2
TEST_SERVER_S3_BUCKET: ${{ vars.TEST_SERVER_S3_BUCKET }}
TEST_SERVER_KMS_KEY_ARN: ${{ vars.TEST_SERVER_KMS_KEY_ARN }}
GRADLE_OPTS: "-Dorg.gradle.daemon=true -Dorg.gradle.parallel=true -Dorg.gradle.caching=true"
- name: Upload server logs
if: always()
uses: actions/upload-artifact@v7
with:
name: server-logs
path: |
test-server/*/server.log
- name: Stop the servers
run: cd test-server && make test-servers-stop
- name: Upload results
if: always()
uses: actions/upload-artifact@v7
with:
name: results
path: test-server/java-tests/build/reports/tests/integ