-
Notifications
You must be signed in to change notification settings - Fork 878
195 lines (174 loc) · 5.67 KB
/
test-examples.yml
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
name: Test examples
on:
pull_request:
branches:
- master
schedule:
- cron: 0 9 * * *
repository_dispatch:
types:
- run-tests-command
workflow_dispatch: {}
jobs:
lint:
runs-on: pulumi-ubuntu-8core
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Install tools and dependencies
uses: ./.github/actions/setup
id: setup
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Lint files
run: |
make lint
unit-ts:
runs-on: pulumi-ubuntu-8core
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Install tools and dependencies
uses: ./.github/actions/setup
id: setup
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run unit tests
run: |
npm install
npx mocha -r ts-node/register ec2tests.ts
npx mocha -r ts-node/register bucket_pair_test.ts
working-directory: testing-unit-ts/mocha
unit-py:
runs-on: pulumi-ubuntu-8core
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Install tools and dependencies
uses: ./.github/actions/setup
id: setup
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run unit tests
run: |
python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt
python -m unittest
working-directory: testing-unit-py
unit-go:
runs-on: pulumi-ubuntu-8core
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Install tools and dependencies
uses: ./.github/actions/setup
id: setup
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run unit tests
run: |
go test
working-directory: testing-unit-go
unit-dotnet:
runs-on: pulumi-ubuntu-8core
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Install tools and dependencies
uses: ./.github/actions/setup
id: setup
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run unit tests
run: |
dotnet test
working-directory: ${{ matrix.source-dir }}
strategy:
fail-fast: false
matrix:
source-dir:
- testing-unit-cs
- testing-unit-cs-mocks
- testing-unit-fs-mocks
provider:
if: false
runs-on: pulumi-ubuntu-8core
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Install tools and dependencies
uses: ./.github/actions/setup
id: setup
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run ${{ matrix.clouds }}${{ matrix.languages }} Tests
run: make specific_test_set TestSet=${{ matrix.clouds }}${{ matrix.languages }}
env:
AWS_ACCESS_KEY_ID: ${{ steps.setup.outputs.aws-access-key-id }}
AWS_SECRET_ACCESS_KEY: ${{ steps.setup.outputs.aws-secret-access-key }}
AWS_SESSION_TOKEN: ${{ steps.setup.outputs.aws-session-token }}
AWS_REGION: ${{ steps.setup.outputs.aws-region }}
ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }}
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
ARM_ENVIRONMENT: public
ARM_LOCATION: westus
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }}
GOOGLE_PROJECT: ${{ steps.setup.outputs.google-project-name }}
GOOGLE_REGION: ${{ steps.setup.outputs.google-region }}
GOOGLE_ZONE: ${{ steps.setup.outputs.google-zone }}
DIGITALOCEAN_TOKEN: ${{ secrets.DIGITALOCEAN_TOKEN }}
PACKET_AUTH_TOKEN: ${{ secrets.PACKET_AUTH_TOKEN }}
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
PULUMI_API: https://api.pulumi-staging.io
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
strategy:
fail-fast: false
matrix:
platform:
- pulumi-ubuntu-8core
clouds:
- DigitalOcean
- Aws
- Azure
- Gcp
- Packet
- EquinixMetal
- Cloud
languages:
- Cs
- Js
- Ts
- Py
- Fs