Adding Gotestfmt to CI scripts for ensuring simplicity of test runs
MODIFY
.github/workflows/cron.yml
.github/workflows/cron.yml
@@ -135,6 +135,10 @@ jobs:
- name: Install Latest Stable Pulumi CLI
uses: pulumi/action-install-pulumi-cli@v1.0.1
- run: echo "Currently Pulumi $(pulumi version) is installed"
+ - name: Set up gotestfmt
+ uses: haveyoudebuggedit/gotestfmt-action@v2
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Go Dependencies
run: make ensure
- name: Setup Config
@@ -142,7 +146,9 @@ jobs:
mkdir -p "$HOME/.kube/"
pulumi stack -s "${{ env.PULUMI_TEST_OWNER }}/${{ github.sha }}-${{ github.run_number }}" -C misc/scripts/testinfra/ output --show-secrets kubeconfig >~/.kube/config
- name: Run ${{ matrix.tests-set }} Tests
- run: make specific_test_set TestSet=Kubernetes
+ run: |
+ set -euo pipefail
+ cd misc/test && go test . --timeout 4h -v -json -count=1 -short -parallel 40 --tags=all --run=TestAccKubernetes 2>&1 | tee /tmp/gotest.log | gotestfmt
strategy:
fail-fast: false
matrix:
@@ -262,11 +268,16 @@ jobs:
- if: matrix.examples-test-matrix == 'default' || matrix.examples-test-matrix == 'no-latest-packages'
run: echo "/home/runner/.pulumi/bin" >> $GITHUB_PATH
- run: echo "Currently Pulumi $(pulumi version) is installed"
+ - name: Set up gotestfmt
+ uses: haveyoudebuggedit/gotestfmt-action@v2
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Testing Dependencies
run: make ensure
- name: Running ${{ matrix.clouds }}${{ matrix.languages }} Tests
- run: make specific_test_set TestSet=${{ matrix.clouds }}${{ matrix.languages
- }}
+ run: |
+ set -euo pipefail
+ cd misc/test && go test . --timeout 4h -v -json -count=1 -short -parallel 40 --tags=all --run=TestAcc${{ matrix.clouds }}${{ matrix.languages }} 2>&1 | tee /tmp/gotest.log | gotestfmt
strategy:
fail-fast: false
matrix:

MODIFY
.github/workflows/run-tests-command.yml
.github/workflows/run-tests-command.yml
@@ -161,14 +161,20 @@ jobs:
- name: Install Latest Stable Pulumi CLI
uses: pulumi/action-install-pulumi-cli@v1.0.1
- run: echo "Currently Pulumi $(pulumi version) is installed"
+ - name: Set up gotestfmt
+ uses: haveyoudebuggedit/gotestfmt-action@v2
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Go Dependencies
run: make ensure
- name: Setup Config
run: |-
mkdir -p "$HOME/.kube/"
pulumi stack -s "${{ env.PULUMI_TEST_OWNER }}/${{ github.sha }}-${{ github.run_number }}" -C misc/scripts/testinfra/ output --show-secrets kubeconfig >~/.kube/config
- - name: Run ${{ matrix.tests-set }} Tests
- run: make specific_test_set TestSet=Kubernetes
+ - name: Run Kubernetes Tests
+ run: |
+ set -euo pipefail
+ cd misc/test && go test . --timeout 4h -v -json -count=1 -short -parallel 40 --tags=all --run=TestAccKubernetes 2>&1 | tee /tmp/gotest.log | gotestfmt
strategy:
fail-fast: false
matrix:
@@ -280,11 +286,16 @@ jobs:
- name: Install Latest Stable Pulumi CLI
uses: pulumi/action-install-pulumi-cli@v1.0.1
- run: echo "Currently Pulumi $(pulumi version) is installed"
+ - name: Set up gotestfmt
+ uses: haveyoudebuggedit/gotestfmt-action@v2
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Testing Dependencies
run: make ensure
- name: Running ${{ matrix.clouds }}${{ matrix.languages }} Tests
- run: make specific_test_set TestSet=${{ matrix.clouds }}${{ matrix.languages
- }}
+ run: |
+ set -euo pipefail
+ cd misc/test && go test . --timeout 4h -v -json -count=1 -short -parallel 40 --tags=all --run=TestAcc${{ matrix.clouds }}${{ matrix.languages }} 2>&1 | tee /tmp/gotest.log | gotestfmt
strategy:
fail-fast: false
matrix:

MODIFY
.github/workflows/smoke-test-cli-command.yml
.github/workflows/smoke-test-cli-command.yml
@@ -137,14 +137,20 @@ jobs:
with:
pulumi-version: ${{ env.PULUMI_VERSION }}
- run: echo "Currently Pulumi $(pulumi version) is installed"
+ - name: Set up gotestfmt
+ uses: haveyoudebuggedit/gotestfmt-action@v2
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Go Dependencies
run: make ensure
- name: Setup Config
run: |-
mkdir -p "$HOME/.kube/"
pulumi stack -s "${{ env.PULUMI_TEST_OWNER }}/${{ github.sha }}-${{ github.run_number }}" -C misc/scripts/testinfra/ output --show-secrets kubeconfig >~/.kube/config
- - name: Run ${{ matrix.tests-set }} Tests
- run: make specific_test_set TestSet=Kubernetes
+ - name: Run Kubernetes Tests
+ run: |
+ set -euo pipefail
+ cd misc/test && go test . --timeout 4h -v -json -count=1 -short -parallel 40 --tags=all --run=TestAccKubernetes 2>&1 | tee /tmp/gotest.log | gotestfmt
strategy:
fail-fast: false
matrix:
@@ -225,11 +231,16 @@ jobs:
with:
pulumi-version: ${{ env.PULUMI_VERSION }}
- run: echo "Currently Pulumi $(pulumi version) is installed"
+ - name: Set up gotestfmt
+ uses: haveyoudebuggedit/gotestfmt-action@v2
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Testing Dependencies
run: make ensure
- name: Running ${{ matrix.clouds }}${{ matrix.languages }} Tests
- run: make specific_test_set TestSet=${{ matrix.clouds }}${{ matrix.languages
- }}
+ run: |
+ set -euo pipefail
+ cd misc/test && go test . --timeout 4h -v -json -count=1 -short -parallel 40 --tags=all --run=TestAcc${{ matrix.clouds }}${{ matrix.languages }} 2>&1 | tee /tmp/gotest.log | gotestfmt
strategy:
fail-fast: false
matrix:

MODIFY
.github/workflows/smoke-test-provider-command.yml
.github/workflows/smoke-test-provider-command.yml
@@ -137,6 +137,10 @@ jobs:
with:
pulumi-version: ${{ env.PULUMI_VERSION }}
- run: echo "Currently Pulumi $(pulumi version) is installed"
+ - name: Set up gotestfmt
+ uses: haveyoudebuggedit/gotestfmt-action@v2
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Go Dependencies
run: make ensure
- name: Setup Config
@@ -144,7 +148,9 @@ jobs:
mkdir -p "$HOME/.kube/"
pulumi stack -s "${{ env.PULUMI_TEST_OWNER }}/${{ github.sha }}-${{ github.run_number }}" -C misc/scripts/testinfra/ output --show-secrets kubeconfig >~/.kube/config
- name: Run Kubernetes Smoke Tests
- run: make specific_tag_set TagSet=Kubernetes
+ run: |
+ set -euo pipefail
+ cd misc/test && go test . --timeout 4h -v -json -count=1 -short -parallel 40 --tags=Kubernetes --run=TestAccKubernetes 2>&1 | tee /tmp/gotest.log | gotestfmt
strategy:
fail-fast: false
matrix:
@@ -225,11 +231,16 @@ jobs:
with:
pulumi-version: ${{ env.PULUMI_VERSION }}
- run: echo "Currently Pulumi $(pulumi version) is installed"
+ - name: Set up gotestfmt
+ uses: haveyoudebuggedit/gotestfmt-action@v2
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Testing Dependencies
run: make ensure
- name: Running ${{ env.PROVIDER_TESTS_TAG }}${{ matrix.languages }} Smoke Tests
- run: make specific_tag_set TestSet=${{ matrix.languages }} TagSet=${{ env.PROVIDER_TESTS_TAG
- }}
+ run: |
+ set -euo pipefail
+ cd misc/test && go test . --timeout 4h -v -json -count=1 -short -parallel 40 --tags=${{ env.PROVIDER_TESTS_TAG }} --run=TestAcc${{ matrix.languages }} 2>&1 | tee /tmp/gotest.log | gotestfmt
strategy:
fail-fast: false
matrix:

MODIFY
.gitignore
.gitignore
@@ -19,6 +19,7 @@ key.rsa*
obj/
vendor
Gopkg.lock
+**/.DS_Store
**/ci-scripts

Adding Gotestfmt to CI scripts for ensuring simplicity of test runs (#1134)