Skip to content

Test

Test #11550

Workflow file for this run

name: Test
on:
push:
branches:
- main
pull_request:
schedule:
- cron: '0 0/2 * * *' # Every two hours
jobs:
test:
name: test (${{ matrix.name }})
if: ${{ github.repository == 'warpstreamlabs/bento' || github.event_name != 'schedule' }}
runs-on: ubuntu-latest
strategy:
matrix:
include:
- cgo: 1
tags: x_bento_extra
name: CGO
- cgo: 0
tags: ""
name: Native
env:
CGO_ENABLED: ${{ matrix.cgo }}
TAGS: ${{ matrix.tags }}
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
check-latest: true
- name: Download External Deps
if: ${{ matrix.tags == 'x_bento_extra' }}
run: sudo apt-get update && sudo apt-get install -y libzmq3-dev
- name: Deps
run: make deps && git diff-index --quiet HEAD || { >&2 echo "Stale go.{mod,sum} detected. This can be fixed with 'make deps'."; exit 1; }
- name: Docs
if: ${{ matrix.tags == 'x_bento_extra' }}
run: make docs && git diff-index --quiet HEAD || { >&2 echo "Stale docs detected. This can be fixed with 'make docs'."; exit 1; }
- name: Test
run: make test
golangci-lint:
if: ${{ github.repository == 'warpstreamlabs/bento' || github.event_name != 'schedule' }}
runs-on: ubuntu-latest
env:
CGO_ENABLED: 0
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
check-latest: true
- name: Lint
uses: golangci/golangci-lint-action@v9
with:
version: v2.11.3
build-docsite:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Build Doc Site
uses: actions/setup-node@v6
with:
node-version: 20.x
- run: yarn --cwd ./website install && yarn --cwd ./website build