diff --git a/.github/workflows/apidiff.yml b/.github/workflows/apidiff.yml index 4ca16b569..a2924ea8e 100644 --- a/.github/workflows/apidiff.yml +++ b/.github/workflows/apidiff.yml @@ -1,30 +1,37 @@ name: API Compatibility -on: [push, pull_request] +on: + merge_group: + push: + branches: + - main + pull_request: + branches: + - "**" jobs: apidiff: runs-on: ubuntu-latest if: github.base_ref steps: - - name: Setup Go - uses: actions/setup-go@v4 - with: - go-version: 1.20.x - - name: Add GOBIN to PATH - run: echo "$(go env GOPATH)/bin" >>$GITHUB_PATH - - name: Install apidiff cmd - run: go install golang.org/x/exp/cmd/apidiff@latest - - name: Checkout base code - uses: actions/checkout@v3 - with: - ref: ${{ github.base_ref }} - path: "base" - - name: Capture apidiff baseline - run: apidiff -m -w ../baseline.bin . - working-directory: "base" - - name: Checkout updated code - uses: actions/checkout@v3 - with: - path: "updated" - - name: Run apidiff check - run: apidiff -m -incompatible ../baseline.bin . - working-directory: "updated" + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: 1.20.x + - name: Add GOBIN to PATH + run: echo "$(go env GOPATH)/bin" >>$GITHUB_PATH + - name: Install apidiff cmd + run: go install golang.org/x/exp/cmd/apidiff@latest + - name: Checkout base code + uses: actions/checkout@v3 + with: + ref: ${{ github.base_ref }} + path: "base" + - name: Capture apidiff baseline + run: apidiff -m -w ../baseline.bin . + working-directory: "base" + - name: Checkout updated code + uses: actions/checkout@v3 + with: + path: "updated" + - name: Run apidiff check + run: apidiff -m -incompatible ../baseline.bin . + working-directory: "updated" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f70617b49..311183e5c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,12 @@ ---- name: CI -on: [push, pull_request] +on: + merge_group: + push: + branches: + - main + pull_request: + branches: + - "**" jobs: lint: name: Linting with Go ${{ matrix.go-version }} diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index acca87cac..975391764 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,13 +1,14 @@ name: "CodeQL" - on: + merge_group: push: - branches: [main] + branches: + - main pull_request: - branches: [main] + branches: + - "**" schedule: - - cron: '39 12 * * 1' - + - cron: "39 12 * * 1" jobs: analyze: name: Analyze @@ -16,28 +17,22 @@ jobs: actions: read contents: read security-events: write - strategy: fail-fast: false matrix: - language: ['go'] - + language: ["go"] steps: - name: Checkout repository uses: actions/checkout@v3 - - name: Initialize CodeQL uses: github/codeql-action/init@v2 with: languages: ${{ matrix.language }} - - name: Setup Go uses: actions/setup-go@v4 with: go-version: 1.17 - - name: Autobuild uses: github/codeql-action/autobuild@v2 - - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/fuzz.yml b/.github/workflows/fuzz.yml index 3ef624821..d720e57b1 100644 --- a/.github/workflows/fuzz.yml +++ b/.github/workflows/fuzz.yml @@ -1,33 +1,29 @@ ---- name: Fuzzing - -on: [push, pull_request] - +on: + merge_group: + push: + branches: + - main + pull_request: + branches: + - "**" jobs: test: name: Fuzz runs-on: ubuntu-latest - # We want to run on external PRs, but not on our own internal PRs as they'll be run - # by the push to the branch. - if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository - env: GOFLAGS: -trimpath - steps: - uses: actions/checkout@v3 - - name: Setup Go uses: actions/setup-go@v4 with: go-version: 1.19.x - - name: Get Go environment id: go-env run: | echo "cache=$(go env GOCACHE)" >> $GITHUB_OUTPUT echo "modcache=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT - - name: Set up cache uses: actions/cache@v3 with: @@ -37,6 +33,5 @@ jobs: key: fuzz-go-${{ hashFiles('**/go.sum') }} restore-keys: | fuzz-go- - - name: Run any fuzzing tests run: go test -v -run=^Fuzz -test.fuzztime=5m ./... diff --git a/.github/workflows/fvt.yml b/.github/workflows/fvt.yml index a4fd16e18..452919541 100644 --- a/.github/workflows/fvt.yml +++ b/.github/workflows/fvt.yml @@ -1,14 +1,16 @@ ---- name: FVT -on: [push, pull_request] +on: + merge_group: + push: + branches: + - main + pull_request: + branches: + - "**" jobs: fvt: name: Test with Kafka ${{ matrix.kafka-version }} runs-on: ubuntu-latest - - # We want to run on external PRs, but not on our own internal PRs as they'll be run - # by the push to the branch. - if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository strategy: fail-fast: false matrix: diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 8452c344f..902bcbf73 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -2,35 +2,32 @@ name: "Stale issues and PRs" on: schedule: - - cron: "0 */2 * * *" - + - cron: "0 */2 * * *" jobs: stale: runs-on: ubuntu-latest - steps: - - uses: actions/stale@v8 - with: - days-before-stale: 90 - days-before-close: 30 - stale-issue-message: >- - Thank you for taking the time to raise this issue. However, it has - not had any activity on it in the past 90 days and will be closed in - 30 days if no updates occur. + - uses: actions/stale@v8 + with: + days-before-stale: 90 + days-before-close: 30 + stale-issue-message: >- + Thank you for taking the time to raise this issue. However, it has not had + any activity on it in the past 90 days and will be closed in 30 days if + no updates occur. - Please check if the main branch has already resolved the issue - since it was raised. If you believe the issue is still valid and you - would like input from the maintainers then please comment to ask for - it to be reviewed. - stale-pr-message: >- - Thank you for your contribution! However, this pull request has not - had any activity in the past 90 days and will be closed in 30 days if - no updates occur. + Please check if the main branch has already resolved the issue since it + was raised. If you believe the issue is still valid and you would like input + from the maintainers then please comment to ask for it to be reviewed. + stale-pr-message: >- + Thank you for your contribution! However, this pull request has not had + any activity in the past 90 days and will be closed in 30 days if no updates + occur. - If you believe the changes are still valid then please verify your - branch has no conflicts with main and rebase if needed. If you - are awaiting a (re-)review then please let us know. - stale-issue-label: "stale" - exempt-issue-labels: "stale/exempt,pinned" - stale-pr-label: "stale" - exempt-pr-labels: "stale/exempt,pinned" + If you believe the changes are still valid then please verify your branch + has no conflicts with main and rebase if needed. If you are awaiting a (re-)review + then please let us know. + stale-issue-label: "stale" + exempt-issue-labels: "stale/exempt,pinned" + stale-pr-label: "stale" + exempt-pr-labels: "stale/exempt,pinned"