diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 51afeff511a..c1d79278012 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -18,13 +18,32 @@ on: branches: - '**' +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: - test: + test-linux: + name: Test (Linux) + runs-on: [self-hosted, linux, bee] + steps: + - name: Checkout + uses: actions/checkout@v5 + - name: Setup Go + uses: actions/setup-go@v6 + with: + cache: true + go-version-file: go.mod + - name: Build + run: make build + - name: Test with race detector + run: make test-ci-race + test-other: name: Test runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [macos-latest, windows-latest] steps: - name: Checkout uses: actions/checkout@v5 @@ -33,19 +52,14 @@ jobs: with: cache: true go-version-file: go.mod - - name: Increase UDP buffer sizes (Ubuntu) - if: matrix.os == 'ubuntu-latest' - run: | - sudo sysctl -w net.core.rmem_max=7500000 - sudo sysctl -w net.core.wmem_max=7500000 - name: Increase UDP buffer sizes (macOS) if: matrix.os == 'macos-latest' run: | sudo sysctl -w kern.ipc.maxsockbuf=6291456 - name: Build run: make build - - name: Test with race detector (Ubuntu and MacOS) - if: matrix.os != 'windows-latest' + - name: Test with race detector (macOS) + if: matrix.os == 'macos-latest' run: make test-ci-race - name: Test without race detector (Windows) if: matrix.os == 'windows-latest' @@ -107,7 +121,7 @@ jobs: trigger-beekeeper: name: Trigger Beekeeper runs-on: ubuntu-latest - needs: [test, lint, coverage] + needs: [test-linux, test-other, lint, coverage] if: github.ref == 'refs/heads/master' steps: - name: Checkout