Simplify OIDC extraTest (#4909) #876
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt | |
env: | |
AWS_REGION: us-west-2 | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} | |
OIDC_ROLE_ARN: ${{ secrets.OIDC_ROLE_ARN }} | |
PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | |
PUBLISH_REPO_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} | |
PULUMI_API: https://api.pulumi-staging.io | |
PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. | |
PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget | |
PULUMI_MISSING_DOCS_ERROR: "true" | |
PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | |
PYPI_USERNAME: __token__ | |
SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} | |
SIGNING_KEY_ID: ${{ secrets.JAVA_SIGNING_KEY_ID }} | |
SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }} | |
TF_APPEND_USER_AGENT: pulumi | |
jobs: | |
prerequisites: | |
uses: ./.github/workflows/prerequisites.yml | |
secrets: inherit | |
with: | |
default_branch: ${{ github.event.repository.default_branch }} | |
is_pr: ${{ github.event_name == 'pull_request' }} | |
is_automated: ${{ github.actor == 'dependabot[bot]' }} | |
build_provider: | |
uses: ./.github/workflows/build_provider.yml | |
needs: prerequisites | |
secrets: inherit | |
with: | |
version: ${{ needs.prerequisites.outputs.version }} | |
build_sdk: | |
name: build_sdk | |
needs: prerequisites | |
uses: ./.github/workflows/build_sdk.yml | |
secrets: inherit | |
with: | |
version: ${{ needs.prerequisites.outputs.version }} | |
generate_coverage_data: | |
continue-on-error: true | |
env: | |
COVERAGE_OUTPUT_DIR: ${{ secrets.COVERAGE_OUTPUT_DIR }} | |
name: generate_coverage_data | |
needs: prerequisites | |
runs-on: ubuntu-latest | |
steps: | |
- name: Free Disk Space (Ubuntu) | |
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 | |
with: | |
tool-cache: false | |
swap-storage: false | |
- name: Checkout Repo | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
submodules: true | |
persist-credentials: false | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_CORP_S3_UPLOAD_ACCESS_KEY_ID }} | |
aws-region: us-west-2 | |
aws-secret-access-key: ${{ secrets.AWS_CORP_S3_UPLOAD_SECRET_ACCESS_KEY }} | |
- name: Setup tools | |
uses: ./.github/actions/setup-tools | |
with: | |
tools: pulumictl, pulumicli, go, schema-tools | |
- name: Echo Coverage Output Dir | |
run: 'echo "Coverage output directory: ${{ env.COVERAGE_OUTPUT_DIR }}"' | |
- name: Generate Coverage Data | |
run: PULUMI_MISSING_DOCS_ERROR=true make tfgen | |
- name: Summarize Provider Coverage Results | |
run: cat ${{ env.COVERAGE_OUTPUT_DIR }}/shortSummary.txt | |
- name: Upload coverage data to S3 | |
run: >- | |
summaryName="${PROVIDER}_summary_$(date +"%Y-%m-%d_%H-%M-%S").json" | |
s3FullURI="s3://${{ secrets.S3_COVERAGE_BUCKET_NAME }}/summaries/${summaryName}" | |
aws s3 cp "${{ env.COVERAGE_OUTPUT_DIR }}/summary.json" "${s3FullURI}" --acl bucket-owner-full-control | |
license_check: | |
name: License Check | |
uses: ./.github/workflows/license.yml | |
secrets: inherit | |
publish: | |
name: publish | |
permissions: | |
contents: write | |
needs: | |
- prerequisites | |
- build_provider | |
- test | |
- license_check | |
- go_test_shim | |
- provider_test | |
- upstream_lint | |
uses: ./.github/workflows/publish.yml | |
secrets: inherit | |
with: | |
version: ${{ needs.prerequisites.outputs.version }} | |
isPrerelease: true | |
skipGoSdk: true | |
skipJavaSdk: true | |
tag_release_if_labeled_needs_release: | |
name: Tag release if labeled as needs-release | |
needs: publish | |
runs-on: ubuntu-latest | |
steps: | |
- name: check if this commit needs release | |
if: ${{ env.RELEASE_BOT_ENDPOINT != '' }} | |
uses: pulumi/action-release-by-pr-label@main | |
with: | |
command: "release-if-needed" | |
repo: ${{ github.repository }} | |
commit: ${{ github.sha }} | |
slack_channel: ${{ secrets.RELEASE_OPS_SLACK_CHANNEL }} | |
env: | |
RELEASE_BOT_ENDPOINT: ${{ secrets.RELEASE_BOT_ENDPOINT }} | |
RELEASE_BOT_KEY: ${{ secrets.RELEASE_BOT_KEY }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
test: | |
name: test | |
needs: | |
- prerequisites | |
- build_provider | |
- build_sdk | |
permissions: | |
contents: read | |
id-token: write | |
runs-on: ubuntu-latest | |
env: | |
PROVIDER_VERSION: ${{ needs.prerequisites.outputs.version }} | |
steps: | |
# Run as first step so we don't delete things that have just been installed | |
- name: Free Disk Space (Ubuntu) | |
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 | |
with: | |
tool-cache: false | |
swap-storage: false | |
dotnet: false | |
- name: Checkout Repo | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
submodules: true | |
persist-credentials: false | |
- name: Setup tools | |
uses: ./.github/actions/setup-tools | |
with: | |
tools: pulumictl, pulumicli, ${{ matrix.language }} | |
- name: Prepare local workspace | |
run: make prepare_local_workspace | |
- name: Download bin | |
uses: ./.github/actions/download-bin | |
- name: Download SDK | |
uses: ./.github/actions/download-sdk | |
with: | |
language: ${{ matrix.language }} | |
- name: Restore makefile progress | |
run: make --touch provider schema build_${{ matrix.language }} | |
- name: Update path | |
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" | |
- name: Install Python deps | |
if: matrix.language == 'python' | |
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: Make upstream | |
run: make upstream | |
- name: Run tests | |
run: cd examples && go test -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 | |
strategy: | |
fail-fast: false | |
matrix: | |
language: | |
- nodejs | |
- python | |
- dotnet | |
- go | |
- java | |
go_test_shim: | |
name: Run test of provider shim | |
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 | |
- name: Prepare local workspace | |
run: make prepare_local_workspace | |
- name: go test | |
run: | | |
cd upstream | |
go get github.com/hashicorp/[email protected] | |
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 | |
needs: build_sdk | |
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: Prepare local workspace | |
run: make prepare_local_workspace | |
- name: Download bin | |
uses: ./.github/actions/download-bin | |
- name: Download SDK | |
uses: ./.github/actions/download-sdk | |
with: | |
language: ${{ matrix.language }} | |
- name: Restore makefile progress | |
run: make --touch provider schema build_${{ 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 | |
strategy: | |
fail-fast: false | |
matrix: | |
language: | |
- nodejs | |
- python | |
- dotnet | |
- go | |
- java | |
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.23.x | |
- name: Prepare local workspace | |
run: make prepare_local_workspace | |
- name: upstream lint | |
run: | | |
cd upstream | |
make provider-lint | |
timeout-minutes: 60 | |
name: master | |
on: | |
workflow_dispatch: {} | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- "**.md" | |
tags-ignore: | |
- v* | |
- sdk/* | |
- "**" |