Skip to content

feat(api): api update #1276

feat(api): api update

feat(api): api update #1276

Workflow file for this run

name: CI
on:
push:
branches:
- '**'
- '!integrated/**'
- '!stl-preview-head/**'
- '!stl-preview-base/**'
- '!generated'
- '!codegen/**'
- 'codegen/stl/**'
pull_request:
branches-ignore:
- 'stl-preview-head/**'
- 'stl-preview-base/**'
jobs:
build:
timeout-minutes: 10
name: build
permissions:
contents: read
id-token: write
runs-on: ${{ github.repository == 'stainless-sdks/privy-api-client-go' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: |-
github.repository == 'stainless-sdks/privy-api-client-go' &&
(github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Get GitHub OIDC Token
if: |-
github.repository == 'stainless-sdks/privy-api-client-go' &&
!startsWith(github.ref, 'refs/heads/stl/')
id: github-oidc
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
script: core.setOutput('github_token', await core.getIDToken());
- name: Upload tarball
if: |-
github.repository == 'stainless-sdks/privy-api-client-go' &&
!startsWith(github.ref, 'refs/heads/stl/')
env:
URL: https://pkg.stainless.com/s
AUTH: ${{ steps.github-oidc.outputs.github_token }}
SHA: ${{ github.sha }}
run: ./scripts/utils/upload-artifact.sh
lint:
timeout-minutes: 10
name: lint
runs-on: ${{ github.repository == 'stainless-sdks/privy-api-client-go' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup go
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
with:
go-version-file: ./go.mod
- name: Run lints
run: ./scripts/lint
test:
timeout-minutes: 10
env:
TEST_APP_ID: ${{ secrets.TEST_APP_ID }}
TEST_APP_SECRET: ${{ secrets.TEST_APP_SECRET }}
JWT_AUTH_SK: ${{ secrets.JWT_AUTH_SK }}
name: test
runs-on: ${{ github.repository == 'stainless-sdks/privy-api-client-go' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup go
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
with:
go-version-file: ./go.mod
- name: Bootstrap
run: ./scripts/bootstrap
- name: Run tests
run: go test ./e2e/... -v
notify-failure:
name: Notify Slack on failure
runs-on: ubuntu-latest
needs: [build, lint, test]
if: ${{ failure() && (github.ref_name == 'next' || github.ref_name == 'main') && github.event_name == 'push' }}
steps:
- name: Notify server-sdk-errors on Slack
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a
with:
webhook: ${{ secrets.SLACK_WEBHOOK_SERVER_SDK_ERRORS }}
webhook-type: incoming-webhook
payload: |
blocks:
- type: "header"
text:
type: "plain_text"
text: "Go SDK CI failure"
- type: "section"
text:
type: "mrkdwn"
text: "Workflow failed on `${{ github.ref_name }}`.\n- `build` job ${{ needs.build.result == 'success' && 'passed' || 'failed' }}\n- `lint` job ${{ needs.lint.result == 'success' && 'passed' || 'failed' }}\n- `test` job ${{ needs.test.result == 'success' && 'passed' || 'failed' }}\n\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View workflow run>"