@@ -58,29 +58,41 @@ jobs:
58
58
ref : ${{ env.PR_COMMIT_SHA }}
59
59
persist-credentials : false
60
60
- name : Checkout p/examples
61
- if : matrix.testTarget == 'pulumiExamples'
62
61
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
63
62
with :
64
63
repository : pulumi/examples
65
64
path : p-examples
66
65
- name : Setup tools
67
66
uses : ./.github/actions/setup-tools
68
- with :
69
- tools : pulumictl, pulumicli, ${{ matrix.language }}
70
67
- name : Prepare local workspace
71
68
run : make prepare_local_workspace
72
69
- name : Download bin
73
70
uses : ./.github/actions/download-bin
74
- - name : Download SDK
71
+ - name : Download nodejs SDK
72
+ uses : ./.github/actions/download-sdk
73
+ with :
74
+ language : nodejs
75
+ - name : Download python SDK
76
+ uses : ./.github/actions/download-sdk
77
+ with :
78
+ language : python
79
+ - name : Download dotnet SDK
75
80
uses : ./.github/actions/download-sdk
76
81
with :
77
- language : ${{ matrix.language }}
82
+ language : dotnet
83
+ - name : Download go SDK
84
+ uses : ./.github/actions/download-sdk
85
+ with :
86
+ language : go
87
+ - name : Download java SDK
88
+ uses : ./.github/actions/download-sdk
89
+ with :
90
+ language : java
78
91
- name : Restore makefile progress
79
- run : make --touch provider schema build_${{ matrix.language }}
92
+ run : make --touch provider schema build_sdks
80
93
- name : Update path
81
94
run : echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
82
95
- name : Install Python deps
83
- if : matrix.language == 'python'
84
96
run : |-
85
97
pip3 install virtualenv==20.0.23
86
98
pip3 install pipenv
@@ -93,21 +105,46 @@ jobs:
93
105
role-duration-seconds : 7200
94
106
role-session-name : eks@githubActions
95
107
role-to-assume : ${{ secrets.AWS_CI_ROLE_ARN }}
96
- - name : Install dependencies
97
- run : make install_${{ matrix.language}}_sdk
108
+ - name : Install prebuilt SDKs
109
+ run : make install_sdks
110
+ - name : Generate test shards
111
+ run : |-
112
+ cd examples
113
+ go run github.com/pulumi/shard@861c9ce4aa851e98c19f8376892bf7e47238fa1b \
114
+ --total ${{ matrix.total-shards }} \
115
+ --index ${{ matrix.current-shard }} \
116
+ --output env >> "$GITHUB_ENV"
98
117
- name : Run tests
99
- if : matrix.testTarget == 'local'
100
- run : cd examples && go test -v -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -skip TestPulumiExamples -parallel 4 .
101
- - name : Run pulumi/examples tests
102
- if : matrix.testTarget == 'pulumiExamples'
103
- run : cd examples && go test -v -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -run TestPulumiExamples -parallel 4 .
118
+ run : |
119
+ make GOTESTARGS="-test.run ${SHARD_TESTS} ${SHARD_PATHS}" test
104
120
strategy :
105
121
fail-fast : false
106
122
matrix :
107
- language :
108
- - nodejs
109
- - python
110
- - dotnet
111
- - go
112
- - java
113
- testTarget : [local]
123
+ total-shards :
124
+ - 25
125
+ current-shard :
126
+ - 0
127
+ - 1
128
+ - 2
129
+ - 3
130
+ - 4
131
+ - 5
132
+ - 6
133
+ - 7
134
+ - 8
135
+ - 9
136
+ - 10
137
+ - 11
138
+ - 12
139
+ - 13
140
+ - 14
141
+ - 15
142
+ - 16
143
+ - 17
144
+ - 18
145
+ - 19
146
+ - 20
147
+ - 21
148
+ - 22
149
+ - 23
150
+ - 24
0 commit comments