Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn on test sharding for k8s and docker-build #1058

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,8 @@ jobs:
name: ${{ matrix.language }}-sdk.tar.gz
path: ${{ github.workspace}}/sdk/
- name: UnTar SDK folder
run: tar -zxf ${{ github.workspace}}/sdk/${{ matrix.language}}.tar.gz -C ${{
github.workspace}}/sdk/${{ matrix.language}}
run: for f in *.tar.gz; do tar -zxf "$f" -C "${f%.tar.gz}"; done
working-directory: ${{ github.workspace}}/sdk
- name: Update path
run: echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
- name: Install Node dependencies
Expand All @@ -332,7 +332,7 @@ jobs:
pip3 install virtualenv==20.0.23
pip3 install pipenv
- name: Install dependencies
run: make install_${{ matrix.language}}_sdk
run: make install_sdks
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,8 @@ jobs:
name: ${{ matrix.language }}-sdk.tar.gz
path: ${{ github.workspace}}/sdk/
- name: UnTar SDK folder
run: tar -zxf ${{ github.workspace}}/sdk/${{ matrix.language}}.tar.gz -C ${{
github.workspace}}/sdk/${{ matrix.language}}
run: for f in *.tar.gz; do tar -zxf "$f" -C "${f%.tar.gz}"; done
working-directory: ${{ github.workspace}}/sdk
- name: Update path
run: echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
- name: Install Node dependencies
Expand All @@ -323,7 +323,7 @@ jobs:
pip3 install virtualenv==20.0.23
pip3 install pipenv
- name: Install dependencies
run: make install_${{ matrix.language}}_sdk
run: make install_sdks
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,8 @@ jobs:
name: ${{ matrix.language }}-sdk.tar.gz
path: ${{ github.workspace}}/sdk/
- name: UnTar SDK folder
run: tar -zxf ${{ github.workspace}}/sdk/${{ matrix.language}}.tar.gz -C ${{
github.workspace}}/sdk/${{ matrix.language}}
run: for f in *.tar.gz; do tar -zxf "$f" -C "${f%.tar.gz}"; done
working-directory: ${{ github.workspace}}/sdk
- name: Update path
run: echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
- name: Install Node dependencies
Expand All @@ -323,7 +323,7 @@ jobs:
pip3 install virtualenv==20.0.23
pip3 install pipenv
- name: Install dependencies
run: make install_${{ matrix.language}}_sdk
run: make install_sdks
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,8 @@ jobs:
name: ${{ matrix.language }}-sdk.tar.gz
path: ${{ github.workspace}}/sdk/
- name: UnTar SDK folder
run: tar -zxf ${{ github.workspace}}/sdk/${{ matrix.language}}.tar.gz -C ${{
github.workspace}}/sdk/${{ matrix.language}}
run: for f in *.tar.gz; do tar -zxf "$f" -C "${f%.tar.gz}"; done
working-directory: ${{ github.workspace}}/sdk
- name: Update path
run: echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
- name: Install Node dependencies
Expand All @@ -352,7 +352,7 @@ jobs:
pip3 install virtualenv==20.0.23
pip3 install pipenv
- name: Install dependencies
run: make install_${{ matrix.language}}_sdk
run: make install_sdks
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@ jobs:
name: ${{ matrix.language }}-sdk.tar.gz
path: ${{ github.workspace}}/sdk/
- name: UnTar SDK folder
run: tar -zxf ${{ github.workspace}}/sdk/${{ matrix.language}}.tar.gz -C ${{
github.workspace}}/sdk/${{ matrix.language}}
run: for f in *.tar.gz; do tar -zxf "$f" -C "${f%.tar.gz}"; done
working-directory: ${{ github.workspace}}/sdk
- name: Update path
run: echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
- name: Install Node dependencies
Expand All @@ -292,7 +292,7 @@ jobs:
pip3 install virtualenv==20.0.23
pip3 install pipenv
- name: Install dependencies
run: make install_${{ matrix.language}}_sdk
run: make install_sdks
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,8 @@ jobs:
name: ${{ matrix.language }}-sdk.tar.gz
path: ${{ github.workspace}}/sdk/
- name: UnTar SDK folder
run: tar -zxf ${{ github.workspace}}/sdk/${{ matrix.language}}.tar.gz -C ${{
github.workspace}}/sdk/${{ matrix.language}}
run: for f in *.tar.gz; do tar -zxf "$f" -C "${f%.tar.gz}"; done
working-directory: ${{ github.workspace}}/sdk
- name: Update path
run: echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
- name: Install Node dependencies
Expand All @@ -283,7 +283,7 @@ jobs:
pip3 install virtualenv==20.0.23
pip3 install pipenv
- name: Install dependencies
run: make install_${{ matrix.language}}_sdk
run: make install_sdks
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,8 @@ jobs:
name: ${{ matrix.language }}-sdk.tar.gz
path: ${{ github.workspace}}/sdk/
- name: UnTar SDK folder
run: tar -zxf ${{ github.workspace}}/sdk/${{ matrix.language}}.tar.gz -C ${{
github.workspace}}/sdk/${{ matrix.language}}
run: for f in *.tar.gz; do tar -zxf "$f" -C "${f%.tar.gz}"; done
working-directory: ${{ github.workspace}}/sdk
- name: Update path
run: echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
- name: Install Node dependencies
Expand All @@ -283,7 +283,7 @@ jobs:
pip3 install virtualenv==20.0.23
pip3 install pipenv
- name: Install dependencies
run: make install_${{ matrix.language}}_sdk
run: make install_sdks
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,8 @@ jobs:
name: ${{ matrix.language }}-sdk.tar.gz
path: ${{ github.workspace}}/sdk/
- name: UnTar SDK folder
run: tar -zxf ${{ github.workspace}}/sdk/${{ matrix.language}}.tar.gz -C ${{
github.workspace}}/sdk/${{ matrix.language}}
run: for f in *.tar.gz; do tar -zxf "$f" -C "${f%.tar.gz}"; done
working-directory: ${{ github.workspace}}/sdk
- name: Update path
run: echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
- name: Install Node dependencies
Expand All @@ -312,7 +312,7 @@ jobs:
pip3 install virtualenv==20.0.23
pip3 install pipenv
- name: Install dependencies
run: make install_${{ matrix.language}}_sdk
run: make install_sdks
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
Expand Down
2 changes: 2 additions & 0 deletions native-provider-ci/providers/docker-build/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ providerVersion: github.com/pulumi/pulumi-docker-build/provider.Version
aws: true
gcp: true
sdkModuleDir: sdk/go/dockerbuild
testShards: 5
testShardDir: examples
env:
AWS_REGION: us-west-2
PULUMI_API: "https://api.pulumi-staging.io"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,12 +253,12 @@ jobs:
strategy:
fail-fast: true
matrix:
language:
- nodejs
- python
- dotnet
- go
- java
shard:
- 0
- 1
- 2
- 3
- 4
name: test
permissions:
contents: read
Expand Down Expand Up @@ -318,14 +318,34 @@ jobs:
- name: Restore Binary Permissions
run: find ${{ github.workspace }} -name "pulumi-*-${{ env.PROVIDER }}" -print
-exec chmod +x {} \;
- name: Download SDK
- name: Download nodejs SDK
uses: actions/download-artifact@v4
with:
name: nodejs-sdk.tar.gz
path: ${{ github.workspace}}/sdk/
- name: Download go SDK
uses: actions/download-artifact@v4
with:
name: go-sdk.tar.gz
path: ${{ github.workspace}}/sdk/
- name: Download dotnet SDK
uses: actions/download-artifact@v4
with:
name: dotnet-sdk.tar.gz
path: ${{ github.workspace}}/sdk/
- name: Download python SDK
uses: actions/download-artifact@v4
with:
name: python-sdk.tar.gz
path: ${{ github.workspace}}/sdk/
- name: Download java SDK
uses: actions/download-artifact@v4
with:
name: ${{ matrix.language }}-sdk.tar.gz
name: java-sdk.tar.gz
path: ${{ github.workspace}}/sdk/
- name: UnTar SDK folder
run: tar -zxf ${{ github.workspace}}/sdk/${{ matrix.language}}.tar.gz -C ${{
github.workspace}}/sdk/${{ matrix.language}}
run: for f in *.tar.gz; do tar -zxf "$f" -C "${f%.tar.gz}"; done
working-directory: ${{ github.workspace}}/sdk
- name: Update path
run: echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
- name: Install Node dependencies
Expand All @@ -336,7 +356,7 @@ jobs:
pip3 install virtualenv==20.0.23
pip3 install pipenv
- name: Install dependencies
run: make install_${{ matrix.language}}_sdk
run: make install_sdks
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
Expand All @@ -363,11 +383,15 @@ jobs:
with:
version: v2.5.0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Shard tests
run: echo go test -v -count=1 -cover -timeout 2h -parallel 4 "$(go run
github.com/blampe/shard@b251cf8da6a83022628496125f285095772ebe86 --total
${{ strategy.job-total }} --index ${{ strategy.job-index }})" >
test-command
working-directory: examples
- name: Run tests
run: >-
set -euo pipefail

cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt
run: cat test-command && $(cat test-command)
working-directory: examples
- if: failure() && github.event_name == 'push'
name: Notify Slack
uses: 8398a7/action-slack@v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,12 +244,12 @@ jobs:
strategy:
fail-fast: true
matrix:
language:
- nodejs
- python
- dotnet
- go
- java
shard:
- 0
- 1
- 2
- 3
- 4
name: test
permissions:
contents: read
Expand Down Expand Up @@ -309,14 +309,34 @@ jobs:
- name: Restore Binary Permissions
run: find ${{ github.workspace }} -name "pulumi-*-${{ env.PROVIDER }}" -print
-exec chmod +x {} \;
- name: Download SDK
- name: Download nodejs SDK
uses: actions/download-artifact@v4
with:
name: nodejs-sdk.tar.gz
path: ${{ github.workspace}}/sdk/
- name: Download go SDK
uses: actions/download-artifact@v4
with:
name: go-sdk.tar.gz
path: ${{ github.workspace}}/sdk/
- name: Download dotnet SDK
uses: actions/download-artifact@v4
with:
name: dotnet-sdk.tar.gz
path: ${{ github.workspace}}/sdk/
- name: Download python SDK
uses: actions/download-artifact@v4
with:
name: ${{ matrix.language }}-sdk.tar.gz
name: python-sdk.tar.gz
path: ${{ github.workspace}}/sdk/
- name: Download java SDK
uses: actions/download-artifact@v4
with:
name: java-sdk.tar.gz
path: ${{ github.workspace}}/sdk/
- name: UnTar SDK folder
run: tar -zxf ${{ github.workspace}}/sdk/${{ matrix.language}}.tar.gz -C ${{
github.workspace}}/sdk/${{ matrix.language}}
run: for f in *.tar.gz; do tar -zxf "$f" -C "${f%.tar.gz}"; done
working-directory: ${{ github.workspace}}/sdk
- name: Update path
run: echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
- name: Install Node dependencies
Expand All @@ -327,7 +347,7 @@ jobs:
pip3 install virtualenv==20.0.23
pip3 install pipenv
- name: Install dependencies
run: make install_${{ matrix.language}}_sdk
run: make install_sdks
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
Expand All @@ -354,11 +374,15 @@ jobs:
with:
version: v2.5.0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Shard tests
run: echo go test -v -count=1 -cover -timeout 2h -parallel 4 "$(go run
github.com/blampe/shard@b251cf8da6a83022628496125f285095772ebe86 --total
${{ strategy.job-total }} --index ${{ strategy.job-index }})" >
test-command
working-directory: examples
- name: Run tests
run: >-
set -euo pipefail

cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt
run: cat test-command && $(cat test-command)
working-directory: examples
- if: failure() && github.event_name == 'push'
name: Notify Slack
uses: 8398a7/action-slack@v3
Expand Down
Loading
Loading