From d894c5d5a8a5ac09c344b3fdb754a7f203c7e67d Mon Sep 17 00:00:00 2001 From: Anton Tayanovskyy Date: Mon, 23 Oct 2023 14:18:20 -0400 Subject: [PATCH] Enable CI to run upgrade tests --- .github/workflows/cron.yml | 18 ++++++++++++- .github/workflows/master.yml | 27 +++++++++++++++++-- .github/workflows/pre-release.yml | 31 ++++++++++++++++++++-- .github/workflows/release.yml | 27 +++++++++++++++++-- .github/workflows/run-acceptance-tests.yml | 19 ++++++++++++- 5 files changed, 114 insertions(+), 8 deletions(-) diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index dae94f9c7..4a50fdb05 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -69,12 +69,26 @@ jobs: with: path: ci-scripts repository: pulumi/scripts + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v1 + 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: ${{ env.PROVIDER }}@githubActions + role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }} - name: Unshallow clone for tags run: git fetch --prune --unshallow --tags - name: Install Go uses: actions/setup-go@v4 with: go-version: ${{ env.GOVERSION }} + - name: Install gotestfmt + uses: GoTestTools/gotestfmt-action@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + version: v2.4.0 - name: Setup Node uses: actions/setup-node@v3 with: @@ -93,7 +107,9 @@ jobs: - name: Install Pulumi CLI uses: pulumi/action-install-pulumi-cli@v2 - name: Build provider - run: make test_provider provider + run: make provider + - name: Test provider + run: make test_provider - name: Check worktree clean run: ./ci-scripts/ci/check-worktree-is-clean - name: Upload bin diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 0e0926c4f..15cbade6e 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -64,6 +64,15 @@ jobs: steps: - name: Checkout Repo uses: actions/checkout@v4 + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v1 + 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: ${{ env.PROVIDER }}@githubActions + role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }} - name: Checkout Scripts Repo uses: actions/checkout@v4 with: @@ -75,6 +84,11 @@ jobs: uses: actions/setup-go@v4 with: go-version: ${{ env.GOVERSION }} + - name: Install gotestfmt + uses: GoTestTools/gotestfmt-action@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + version: v2.4.0 - name: Setup Node uses: actions/setup-node@v1 with: @@ -93,7 +107,9 @@ jobs: - name: Install Pulumi CLI uses: pulumi/action-install-pulumi-cli@v2 - name: Build provider - run: make test_provider provider + run: make provider + - name: Test provider + run: make test_provider - name: Check worktree clean run: ./ci-scripts/ci/check-worktree-is-clean - name: Upload bin @@ -198,6 +214,11 @@ jobs: uses: actions/checkout@v4 - name: Unshallow clone for tags run: git fetch --prune --unshallow --tags + - name: Install gotestfmt + uses: GoTestTools/gotestfmt-action@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + version: v2.4.0 - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v3 with: @@ -228,8 +249,10 @@ jobs: - name: Restore binary perms run: find ${{ github.workspace }}/bin -name "pulumi-*-${{ env.PROVIDER }}" -print -exec chmod +x {} \; + - name: Test provider + run: make test_provider - name: Create Provider Binaries - run: make test_provider dist + run: make dist - name: Upload Provider Binaries run: aws s3 cp dist s3://get.pulumi.com/releases/plugins/ --recursive publish_sdk: diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 0e2d645a7..b40bfcd08 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -64,6 +64,15 @@ jobs: steps: - name: Checkout Repo uses: actions/checkout@v4 + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v1 + 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: ${{ env.PROVIDER }}@githubActions + role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }} - name: Checkout Scripts Repo uses: actions/checkout@v4 with: @@ -75,6 +84,11 @@ jobs: uses: actions/setup-go@v4 with: go-version: ${{ env.GOVERSION }} + - name: Install gotestfmt + uses: GoTestTools/gotestfmt-action@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + version: v2.4.0 - name: Setup Node uses: actions/setup-node@v1 with: @@ -93,7 +107,9 @@ jobs: - name: Install Pulumi CLI uses: pulumi/action-install-pulumi-cli@v2 - name: Build provider - run: make test_provider provider + run: make provider + - name: Test provider + run: make test_provider - name: Check worktree clean run: ./ci-scripts/ci/check-worktree-is-clean - name: Upload bin @@ -195,7 +211,16 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repo +<<<<<<< HEAD uses: actions/checkout@v4 +======= + uses: actions/checkout@v2 + - name: Install gotestfmt + uses: GoTestTools/gotestfmt-action@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + version: v2.4.0 +>>>>>>> 661983f (Enable CI to run upgrade tests) - name: Unshallow clone for tags run: git fetch --prune --unshallow --tags - name: Configure AWS Credentials @@ -228,8 +253,10 @@ jobs: - name: Restore binary perms run: find ${{ github.workspace }}/bin -name "pulumi-*-${{ env.PROVIDER }}" -print -exec chmod +x {} \; + - name: Test provider + run: make test_provider - name: Create Provider Binaries - run: make test_provider dist + run: make dist - name: Upload Provider Binaries run: aws s3 cp dist s3://get.pulumi.com/releases/plugins/ --recursive - name: Create GH Release diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 167873e52..8f0178919 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -63,6 +63,15 @@ jobs: steps: - name: Checkout Repo uses: actions/checkout@v4 + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v1 + 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: ${{ env.PROVIDER }}@githubActions + role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }} - name: Checkout Scripts Repo uses: actions/checkout@v4 with: @@ -74,6 +83,11 @@ jobs: uses: actions/setup-go@v4 with: go-version: ${{ env.GOVERSION }} + - name: Install gotestfmt + uses: GoTestTools/gotestfmt-action@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + version: v2.4.0 - name: Setup Node uses: actions/setup-node@v1 with: @@ -92,7 +106,9 @@ jobs: - name: Install Pulumi CLI uses: pulumi/action-install-pulumi-cli@v2 - name: Build provider - run: make test_provider provider + run: make provider + - name: Test provider + run: make test_provider - name: Check worktree clean run: ./ci-scripts/ci/check-worktree-is-clean - name: Upload bin @@ -197,6 +213,11 @@ jobs: uses: actions/checkout@v4 - name: Unshallow clone for tags run: git fetch --prune --unshallow --tags + - name: Install gotestfmt + uses: GoTestTools/gotestfmt-action@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + version: v2.4.0 - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v3 with: @@ -227,8 +248,10 @@ jobs: - name: Restore binary perms run: find ${{ github.workspace }}/bin -name "pulumi-*-${{ env.PROVIDER }}" -print -exec chmod +x {} \; + - name: Test provider + run: make test_provider - name: Create Provider Binaries - run: make test_provider dist + run: make dist - name: Upload Provider Binaries run: aws s3 cp dist s3://get.pulumi.com/releases/plugins/ --recursive - name: Create GH Release diff --git a/.github/workflows/run-acceptance-tests.yml b/.github/workflows/run-acceptance-tests.yml index cf157ed36..c6d63b080 100644 --- a/.github/workflows/run-acceptance-tests.yml +++ b/.github/workflows/run-acceptance-tests.yml @@ -1,3 +1,4 @@ + env: AWS_REGION: us-west-2 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -89,6 +90,15 @@ jobs: steps: - name: Checkout Repo uses: actions/checkout@v4 + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v1 + 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: ${{ env.PROVIDER }}@githubActions + role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }} - name: Checkout Scripts Repo uses: actions/checkout@v4 with: @@ -100,6 +110,11 @@ jobs: uses: actions/setup-go@v4 with: go-version: ${{ env.GOVERSION }} + - name: Install gotestfmt + uses: GoTestTools/gotestfmt-action@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + version: v2.4.0 - name: Setup Node uses: actions/setup-node@v3 with: @@ -118,7 +133,9 @@ jobs: - name: Install Pulumi CLI uses: pulumi/action-install-pulumi-cli@v2 - name: Build provider - run: make test_provider provider + run: make provider + - name: Test provider + run: make test_provider - name: Check worktree clean run: ./ci-scripts/ci/check-worktree-is-clean - name: Upload bin