diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..7f34accb --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,69 @@ +# WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt + +name: lint + +on: + workflow_call: + inputs: {} + +env: + DOTNETVERSION: | + 6.0.x + 3.1.301 + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GOVERSION: 1.21.x + JAVAVERSION: "11" + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NODEVERSION: 16.x + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} + 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 + PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + PYTHONVERSION: "3.9" + SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} + SIGNING_KEY_ID: ${{ secrets.JAVA_SIGNING_KEY_ID }} + SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + TF_APPEND_USER_AGENT: pulumi + TRAVIS_OS_NAME: linux + WAVEFRONT_ADDRESS: ${{ secrets.WAVEFRONT_ADDRESS }} + WAVEFRONT_TOKEN: ${{ secrets.WAVEFRONT_TOKEN }} + +jobs: + lint: + name: lint + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + - name: Install go + uses: actions/setup-go@v4 + with: + # The versions of golangci-lint and setup-go here cross-depend and need to update together. + go-version: 1.21 + # Either this action or golangci-lint needs to disable the cache + cache: false + - name: disarm go:embed directives to enable lint + continue-on-error: true # this fails if there are no go:embed directives + run: | + git grep -l 'go:embed' -- provider | xargs sed -i 's/go:embed/ goembed/g' + - name: prepare upstream + continue-on-error: true + run: make upstream + - name: golangci-lint + uses: golangci/golangci-lint-action@v3 + with: + version: v1.54.1 + working-directory: provider + - if: failure() && github.event_name == 'push' + name: Notify Slack + uses: 8398a7/action-slack@v3 + with: + author_name: Failure in linting provider + fields: repo,commit,author,action + status: ${{ job.status }} diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index cb92d001..ed4f475f 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -179,34 +179,8 @@ jobs: aws s3 cp "${{ env.COVERAGE_OUTPUT_DIR }}/summary.json" "${s3FullURI}" --acl bucket-owner-full-control lint: name: lint - runs-on: ubuntu-latest - steps: - - name: Checkout Repo - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v4 - with: - cache-dependency-path: | - sdk/go.sum - go-version: 1.21.x - - name: disarm go:embed directives to enable lint - run: | - git grep -l 'go:embed' -- provider | xargs sed -i 's/go:embed/ goembed/g' - - name: prepare upstream - continue-on-error: true - run: make upstream - - name: golangci-lint - uses: golangci/golangci-lint-action@v3 - with: - version: v1.54.1 - working-directory: provider - - if: failure() && github.event_name == 'push' - name: Notify Slack - uses: 8398a7/action-slack@v3 - with: - author_name: Failure in linting provider - fields: repo,commit,author,action - status: ${{ job.status }} + uses: ./.github/workflows/lint.yml + secrets: inherit prerequisites: name: prerequisites runs-on: ubuntu-latest diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 11a74a70..d6eaaa6e 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -126,34 +126,8 @@ jobs: - java lint: name: lint - runs-on: ubuntu-latest - steps: - - name: Checkout Repo - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v4 - with: - cache-dependency-path: | - sdk/go.sum - go-version: 1.21.x - - name: disarm go:embed directives to enable lint - run: | - git grep -l 'go:embed' -- provider | xargs sed -i 's/go:embed/ goembed/g' - - name: prepare upstream - continue-on-error: true - run: make upstream - - name: golangci-lint - uses: golangci/golangci-lint-action@v3 - with: - version: v1.54.1 - working-directory: provider - - if: failure() && github.event_name == 'push' - name: Notify Slack - uses: 8398a7/action-slack@v3 - with: - author_name: Failure in linting provider - fields: repo,commit,author,action - status: ${{ job.status }} + uses: ./.github/workflows/lint.yml + secrets: inherit prerequisites: name: prerequisites runs-on: ubuntu-latest diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7b2f5ca5..0d7ce6d7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -139,34 +139,8 @@ jobs: "${GITHUB_REF#refs/tags/}" lint: name: lint - runs-on: ubuntu-latest - steps: - - name: Checkout Repo - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v4 - with: - cache-dependency-path: | - sdk/go.sum - go-version: 1.21.x - - name: disarm go:embed directives to enable lint - run: | - git grep -l 'go:embed' -- provider | xargs sed -i 's/go:embed/ goembed/g' - - name: prepare upstream - continue-on-error: true - run: make upstream - - name: golangci-lint - uses: golangci/golangci-lint-action@v3 - with: - version: v1.54.1 - working-directory: provider - - if: failure() && github.event_name == 'push' - name: Notify Slack - uses: 8398a7/action-slack@v3 - with: - author_name: Failure in linting provider - fields: repo,commit,author,action - status: ${{ job.status }} + uses: ./.github/workflows/lint.yml + secrets: inherit prerequisites: name: prerequisites runs-on: ubuntu-latest diff --git a/.github/workflows/run-acceptance-tests.yml b/.github/workflows/run-acceptance-tests.yml index 70e6c2e6..3dd1f0be 100644 --- a/.github/workflows/run-acceptance-tests.yml +++ b/.github/workflows/run-acceptance-tests.yml @@ -148,37 +148,8 @@ jobs: if: github.event_name == 'repository_dispatch' || github.event.pull_request.head.repo.full_name == github.repository name: lint - runs-on: ubuntu-latest - steps: - - name: Checkout Repo - uses: actions/checkout@v3 - with: - ref: ${{ env.PR_COMMIT_SHA }} - - name: disarm go:embed directives to enable lint - run: | - git grep -l 'go:embed' -- provider | xargs sed -i 's/go:embed/ goembed/g' - - name: prepare upstream - continue-on-error: true - run: make upstream - - name: Install go - uses: actions/setup-go@v4 - with: - # The versions of golangci-lint and setup-go here cross-depend and need to update together. - go-version: 1.21 - # Either this action or golangci-lint needs to disable the cache - cache: false - - name: golangci-lint - uses: golangci/golangci-lint-action@v3 - with: - version: v1.54.1 - working-directory: provider - - if: failure() && github.event_name == 'push' - name: Notify Slack - uses: 8398a7/action-slack@v3 - with: - author_name: Failure in linting provider - fields: repo,commit,author,action - status: ${{ job.status }} + uses: ./.github/workflows/lint.yml + secrets: inherit prerequisites: if: github.event_name == 'repository_dispatch' || github.event.pull_request.head.repo.full_name == github.repository diff --git a/.gitignore b/.gitignore index 6060d755..7577833a 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,6 @@ sdk/java/build sdk/java/gradle sdk/java/gradlew sdk/java/gradlew.bat + + +sdk/python/venv