From fcf464e609891d2464ad862e3fa1285d8d4b32f7 Mon Sep 17 00:00:00 2001 From: Christian Weichel Date: Mon, 3 Aug 2026 11:58:18 +0000 Subject: [PATCH] ci: replace stale generated workflow Co-authored-by: Codex --- .github/workflows/ci.yml | 88 +++++++++++----------------------------- 1 file changed, 24 insertions(+), 64 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 794b0b7..d870837 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,82 +1,42 @@ name: CI + on: push: branches: - - '**' - - '!integrated/**' - - '!stl-preview-head/**' - - '!stl-preview-base/**' - - '!generated' - - '!codegen/**' - - 'codegen/stl/**' + - main 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: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} - if: |- - github.repository == 'stainless-sdks/gitpod-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 +permissions: + contents: read - - name: Get GitHub OIDC Token - if: |- - github.repository == 'stainless-sdks/gitpod-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()); +concurrency: + group: ci-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true - - name: Upload tarball - if: |- - github.repository == 'stainless-sdks/gitpod-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: +jobs: + test: + name: Go checks + runs-on: ubuntu-latest timeout-minutes: 10 - name: lint - runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && '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: Check out repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Setup go + - name: Set up Go uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 with: - go-version-file: ./go.mod + go-version-file: go.mod + cache-dependency-path: go.sum - - name: Run lints - run: ./scripts/lint - test: - timeout-minutes: 10 - name: test - runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && '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: Check formatting + run: test -z "$(gofmt -l .)" - - name: Setup go - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 - with: - go-version-file: ./go.mod + - name: Vet + run: go vet ./... - - name: Bootstrap - run: ./scripts/bootstrap + - name: Test + run: go test ./... - - name: Run tests - run: ./scripts/test + - name: Build + run: go build ./...