diff --git a/provider-ci/internal/pkg/config.go b/provider-ci/internal/pkg/config.go index 42062dbbc..c1987fcd5 100644 --- a/provider-ci/internal/pkg/config.go +++ b/provider-ci/internal/pkg/config.go @@ -124,11 +124,6 @@ type Config struct { // https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22actions%3A%22&type=code Actions actions `yaml:"actions"` - // ExtraTests run as part of `run-acceptance-tests.yml`, `master.yml`, - // `main.yml`, `prerelease.yml` and `release.yml`. Only used for aws: - // https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22extraTests%3A%22&type=code - ExtraTests map[string]any `yaml:"extraTests"` // Only used by AWS... - // IntegrationTestProvider will run e2e tests in the provider as well as in // the examples directory when set to true. Defaults to false. IntegrationTestProvider bool `yaml:"integrationTestProvider"` diff --git a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/test.yml b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/test.yml index ebe30846a..c2afc0283 100644 --- a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/test.yml +++ b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/test.yml @@ -134,6 +134,3 @@ jobs: #{{- else }}# testTarget: [local] #{{- end }}# -#{{- if .Config.ExtraTests }}# -#{{ .Config.ExtraTests | toYaml | indent 2 }}# -#{{ end }}# diff --git a/provider-ci/internal/pkg/templates/defaults.config.yaml b/provider-ci/internal/pkg/templates/defaults.config.yaml index 9fb1bb008..23daabe10 100644 --- a/provider-ci/internal/pkg/templates/defaults.config.yaml +++ b/provider-ci/internal/pkg/templates/defaults.config.yaml @@ -134,14 +134,6 @@ actions: # preTest: # - Your action here -# Additional tests run as part of `run-acceptance-tests.yml`, `master.yml`, `main.yml`, -# `prerelease.yml` and `release.yml`. -# Only used for aws: https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22extraTests%3A%22&type=code -extraTests: -# your_test_name: -# name: My Test -# ... - # Run e2e tests in the provider as well as in the examples directory integrationTestProvider: false diff --git a/provider-ci/test-providers/aws/.ci-mgmt.yaml b/provider-ci/test-providers/aws/.ci-mgmt.yaml index a98ffffe3..6afe04468 100644 --- a/provider-ci/test-providers/aws/.ci-mgmt.yaml +++ b/provider-ci/test-providers/aws/.ci-mgmt.yaml @@ -5,11 +5,19 @@ parallel: 1 timeout: 150 generate-nightly-test-workflow: true providerVersion: github.com/hashicorp/terraform-provider-aws/version.ProviderVersion +toolVersions: + dotnet: "6.0.x" + go: "1.23.x" + java: "11" + gradle: "7.6" + nodejs: "20.x" + pulumi: "dev" + python: "3.11.8" env: PULUMI_MISSING_DOCS_ERROR: true AWS_REGION: "us-west-2" OIDC_ROLE_ARN: ${{ secrets.OIDC_ROLE_ARN }} -template: bridged-provider +makeTemplate: bridged checkoutSubmodules: true freeDiskSpaceBeforeBuild: true freeDiskSpaceBeforeSdkBuild: true @@ -50,234 +58,8 @@ actions: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-region: ${{ env.AWS_REGION }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - role-duration-seconds: 3600 + role-duration-seconds: 7200 role-session-name: aws@githubActions role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }} - name: Make upstream run: make upstream - -extraTests: - go_test_shim: - name: Run test of provider shim - runs-on: ubuntu-latest - timeout-minutes: 60 - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - with: - ref: ${{ env.PR_COMMIT_SHA }} - submodules: true - - uses: pulumi/provider-version-action@v1 - with: - set-env: 'PROVIDER_VERSION' - - name: Setup tools - uses: ./.github/actions/setup-tools - with: - tools: pulumictl, pulumi, go - - name: Make upstream - run: make upstream - - name: go test - run: | - cd upstream - go get github.com/hashicorp/aws-sdk-go-base@v1.1.0 - cd shim - go test -v -coverprofile="coverage.txt" . - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v4 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - - upstream_lint: - name: Run upstream provider-lint - runs-on: ubuntu-latest - timeout-minutes: 60 - steps: - - name: Free Disk Space (Ubuntu) - uses: jlumbroso/free-disk-space@main - with: - swap-storage: false - tool-cache: false - - name: Checkout Repo - uses: actions/checkout@v4 - with: - ref: ${{ env.PR_COMMIT_SHA }} - submodules: true - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version: "1.22.x" - cache: false - - name: Make upstream - run: make upstream - - name: upstream lint - run: | - cd upstream - make provider-lint - - test_oidc: - name: test_oidc - permissions: - contents: read - id-token: write - runs-on: ubuntu-latest - steps: - - name: Free Disk Space (Ubuntu) - uses: jlumbroso/free-disk-space@main - with: - tool-cache: false - swap-storage: false - dotnet: ${{ matrix.language != 'dotnet' }} - - name: Checkout Repo - uses: actions/checkout@v4 - with: - ref: ${{ env.PR_COMMIT_SHA }} - submodules: true - - uses: pulumi/provider-version-action@v1 - with: - set-env: 'PROVIDER_VERSION' - - name: Setup tools - uses: ./.github/actions/setup-tools - with: - tools: pulumictl, pulumi, go, node - - name: Download provider + tfgen binaries - uses: actions/download-artifact@v4 - with: - name: aws-provider.tar.gz - path: ${{ github.workspace }}/bin - - name: Untar provider binaries - run: >- - tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ - github.workspace}}/bin - - find ${{ github.workspace }} -name "pulumi-*-aws" -print -exec chmod +x {} \; - - name: Download SDK - uses: actions/download-artifact@v4 - with: - name: ${{ matrix.language }}-sdk.tar.gz - path: ${{ github.workspace}}/sdk/ - - name: Uncompress SDK folder - run: tar -zxf ${{ github.workspace }}/sdk/${{ matrix.language }}.tar.gz -C ${{ - github.workspace }}/sdk/${{ matrix.language }} - - name: Update path - run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - - name: Install dependencies - run: make install_${{ matrix.language}}_sdk - - name: Install gotestfmt - uses: GoTestTools/gotestfmt-action@v2 - with: - token: ${{ secrets.GITHUB_TOKEN }} - version: v2.4.0 - - name: Make upstream - run: make upstream - - name: Run selected tests with manual web identity/OIDC auth - run: cd examples && go test -v -json -count=1 -run TestAccCloudWatchOidcManual -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt - - name: Configure AWS Credentials for OIDC - uses: aws-actions/configure-aws-credentials@v4 - with: - unset-current-credentials: true - aws-region: ${{ env.AWS_REGION }} - role-duration-seconds: 3600 - role-session-name: aws@githubActions - role-to-assume: ${{ secrets.OIDC_ROLE_ARN }} - - name: Run selected tests with configure-aws-credentials web identity/OIDC auth - run: cd examples && go test -v -json -count=1 -run TestAccCloudWatch -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt - - if: failure() && github.event_name == 'push' - name: Notify Slack - uses: 8398a7/action-slack@v3 - with: - author_name: Failure in running ${{ matrix.language }} tests - fields: repo,commit,author,action - status: ${{ job.status }} - strategy: - fail-fast: false - matrix: - language: - - nodejs - - provider_test: - name: provider_test - permissions: - contents: read - id-token: write - runs-on: ubuntu-latest - steps: - - name: Free Disk Space (Ubuntu) - uses: jlumbroso/free-disk-space@main - with: - swap-storage: false - tool-cache: false - - name: Checkout Repo - uses: actions/checkout@v4 - with: - ref: ${{ env.PR_COMMIT_SHA }} - submodules: true - - uses: pulumi/provider-version-action@v1 - with: - set-env: 'PROVIDER_VERSION' - - name: Setup tools - uses: ./.github/actions/setup-tools - with: - tools: pulumictl, pulumi, go, node, dotnet, python, java - - name: Make upstream - run: make upstream - - name: Download provider + tfgen binaries - uses: actions/download-artifact@v4 - with: - name: aws-provider.tar.gz - path: ${{ github.workspace }}/bin - - name: Untar provider binaries - run: >- - tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ - github.workspace}}/bin - - find ${{ github.workspace }} -name "pulumi-*-aws" -print -exec chmod +x {} \; - - run: dotnet nuget add source ${{ github.workspace }}/nuget - - name: Download SDK - uses: actions/download-artifact@v4 - with: - name: ${{ matrix.language }}-sdk.tar.gz - path: ${{ github.workspace}}/sdk/ - - name: Uncompress SDK folder - run: tar -zxf ${{ github.workspace }}/sdk/${{ matrix.language }}.tar.gz -C ${{ - github.workspace }}/sdk/${{ matrix.language }} - - name: Update path - run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - - name: Install Python deps - run: |- - pip3 install virtualenv==20.0.23 - pip3 install pipenv - - name: Install dependencies - run: make install_${{ matrix.language}}_sdk - - name: Install gotestfmt - uses: GoTestTools/gotestfmt-action@v2 - with: - token: ${{ secrets.GITHUB_TOKEN }} - version: v2.5.0 - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-region: ${{ env.AWS_REGION }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - role-duration-seconds: 3600 - role-session-name: aws@githubActions - role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }} - - name: Run provider tests - run: | - cd provider && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt - - if: failure() && github.event_name == 'push' - name: Notify Slack - uses: 8398a7/action-slack@v3 - with: - author_name: Failure in running ${{ matrix.language }} provider tests - fields: repo,commit,author,action - status: ${{ job.status }} - strategy: - fail-fast: false - matrix: - language: - - nodejs - - python - - dotnet - - go - - java diff --git a/provider-ci/test-providers/aws/.github/actions/setup-tools/action.yml b/provider-ci/test-providers/aws/.github/actions/setup-tools/action.yml index 9c4f8821a..f84c2c8f6 100644 --- a/provider-ci/test-providers/aws/.github/actions/setup-tools/action.yml +++ b/provider-ci/test-providers/aws/.github/actions/setup-tools/action.yml @@ -28,7 +28,7 @@ runs: if: inputs.tools == 'all' || contains(inputs.tools, 'go') uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5 with: - go-version: "1.21.x" + go-version: "1.23.x" cache-dependency-path: | provider/*.sum upstream/*.sum diff --git a/provider-ci/test-providers/aws/.github/workflows/test.yml b/provider-ci/test-providers/aws/.github/workflows/test.yml index 1964cc0e9..50c7a7f93 100644 --- a/provider-ci/test-providers/aws/.github/workflows/test.yml +++ b/provider-ci/test-providers/aws/.github/workflows/test.yml @@ -92,7 +92,7 @@ jobs: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-region: ${{ env.AWS_REGION }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - role-duration-seconds: 3600 + role-duration-seconds: 7200 role-session-name: aws@githubActions role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }} - name: Make upstream @@ -113,219 +113,3 @@ jobs: - go - java testTarget: [local] - go_test_shim: - name: Run test of provider shim - runs-on: ubuntu-latest - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - with: - ref: ${{ env.PR_COMMIT_SHA }} - submodules: true - - uses: pulumi/provider-version-action@v1 - with: - set-env: PROVIDER_VERSION - - name: Setup tools - uses: ./.github/actions/setup-tools - with: - tools: pulumictl, pulumi, go - - name: Make upstream - run: make upstream - - name: go test - run: | - cd upstream - go get github.com/hashicorp/aws-sdk-go-base@v1.1.0 - cd shim - go test -v -coverprofile="coverage.txt" . - - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v4 - timeout-minutes: 60 - provider_test: - name: provider_test - permissions: - contents: read - id-token: write - runs-on: ubuntu-latest - steps: - - name: Free Disk Space (Ubuntu) - uses: jlumbroso/free-disk-space@main - with: - swap-storage: false - tool-cache: false - - name: Checkout Repo - uses: actions/checkout@v4 - with: - ref: ${{ env.PR_COMMIT_SHA }} - submodules: true - - uses: pulumi/provider-version-action@v1 - with: - set-env: PROVIDER_VERSION - - name: Setup tools - uses: ./.github/actions/setup-tools - with: - tools: pulumictl, pulumi, go, node, dotnet, python, java - - name: Make upstream - run: make upstream - - name: Download provider + tfgen binaries - uses: actions/download-artifact@v4 - with: - name: aws-provider.tar.gz - path: ${{ github.workspace }}/bin - - name: Untar provider binaries - run: |- - tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ github.workspace}}/bin - find ${{ github.workspace }} -name "pulumi-*-aws" -print -exec chmod +x {} \; - - run: dotnet nuget add source ${{ github.workspace }}/nuget - - name: Download SDK - uses: actions/download-artifact@v4 - with: - name: ${{ matrix.language }}-sdk.tar.gz - path: ${{ github.workspace}}/sdk/ - - name: Uncompress SDK folder - run: tar -zxf ${{ github.workspace }}/sdk/${{ matrix.language }}.tar.gz -C ${{ github.workspace }}/sdk/${{ matrix.language }} - - name: Update path - run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - - name: Install Python deps - run: |- - pip3 install virtualenv==20.0.23 - pip3 install pipenv - - name: Install dependencies - run: make install_${{ matrix.language}}_sdk - - name: Install gotestfmt - uses: GoTestTools/gotestfmt-action@v2 - with: - token: ${{ secrets.GITHUB_TOKEN }} - version: v2.5.0 - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-region: ${{ env.AWS_REGION }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - role-duration-seconds: 3600 - role-session-name: aws@githubActions - role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }} - - name: Run provider tests - run: | - cd provider && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt - - if: failure() && github.event_name == 'push' - name: Notify Slack - uses: 8398a7/action-slack@v3 - with: - author_name: Failure in running ${{ matrix.language }} provider tests - fields: repo,commit,author,action - status: ${{ job.status }} - strategy: - fail-fast: false - matrix: - language: - - nodejs - - python - - dotnet - - go - - java - test_oidc: - name: test_oidc - permissions: - contents: read - id-token: write - runs-on: ubuntu-latest - steps: - - name: Free Disk Space (Ubuntu) - uses: jlumbroso/free-disk-space@main - with: - dotnet: ${{ matrix.language != 'dotnet' }} - swap-storage: false - tool-cache: false - - name: Checkout Repo - uses: actions/checkout@v4 - with: - ref: ${{ env.PR_COMMIT_SHA }} - submodules: true - - uses: pulumi/provider-version-action@v1 - with: - set-env: PROVIDER_VERSION - - name: Setup tools - uses: ./.github/actions/setup-tools - with: - tools: pulumictl, pulumi, go, node - - name: Download provider + tfgen binaries - uses: actions/download-artifact@v4 - with: - name: aws-provider.tar.gz - path: ${{ github.workspace }}/bin - - name: Untar provider binaries - run: |- - tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ github.workspace}}/bin - find ${{ github.workspace }} -name "pulumi-*-aws" -print -exec chmod +x {} \; - - name: Download SDK - uses: actions/download-artifact@v4 - with: - name: ${{ matrix.language }}-sdk.tar.gz - path: ${{ github.workspace}}/sdk/ - - name: Uncompress SDK folder - run: tar -zxf ${{ github.workspace }}/sdk/${{ matrix.language }}.tar.gz -C ${{ github.workspace }}/sdk/${{ matrix.language }} - - name: Update path - run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - - name: Install dependencies - run: make install_${{ matrix.language}}_sdk - - name: Install gotestfmt - uses: GoTestTools/gotestfmt-action@v2 - with: - token: ${{ secrets.GITHUB_TOKEN }} - version: v2.4.0 - - name: Make upstream - run: make upstream - - name: Run selected tests with manual web identity/OIDC auth - run: cd examples && go test -v -json -count=1 -run TestAccCloudWatchOidcManual -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt - - name: Configure AWS Credentials for OIDC - uses: aws-actions/configure-aws-credentials@v4 - with: - aws-region: ${{ env.AWS_REGION }} - role-duration-seconds: 3600 - role-session-name: aws@githubActions - role-to-assume: ${{ secrets.OIDC_ROLE_ARN }} - unset-current-credentials: true - - name: Run selected tests with configure-aws-credentials web identity/OIDC auth - run: cd examples && go test -v -json -count=1 -run TestAccCloudWatch -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt - - if: failure() && github.event_name == 'push' - name: Notify Slack - uses: 8398a7/action-slack@v3 - with: - author_name: Failure in running ${{ matrix.language }} tests - fields: repo,commit,author,action - status: ${{ job.status }} - strategy: - fail-fast: false - matrix: - language: - - nodejs - upstream_lint: - name: Run upstream provider-lint - runs-on: ubuntu-latest - steps: - - name: Free Disk Space (Ubuntu) - uses: jlumbroso/free-disk-space@main - with: - swap-storage: false - tool-cache: false - - name: Checkout Repo - uses: actions/checkout@v4 - with: - ref: ${{ env.PR_COMMIT_SHA }} - submodules: true - - name: Install Go - uses: actions/setup-go@v5 - with: - cache: false - go-version: 1.22.x - - name: Make upstream - run: make upstream - - name: upstream lint - run: | - cd upstream - make provider-lint - timeout-minutes: 60 - diff --git a/provider-ci/test-providers/aws/devbox.json b/provider-ci/test-providers/aws/devbox.json index 1917bf703..f31a0b63e 100644 --- a/provider-ci/test-providers/aws/devbox.json +++ b/provider-ci/test-providers/aws/devbox.json @@ -2,7 +2,7 @@ "packages": [ "yarn@latest", "pulumictl@latest", - "go@1.21.", + "go@1.23.", "nodejs@20.", "python3@3.11.8", "dotnet-sdk@6.0.",