Skip to content
go-libfossil Artifact [b3b131c544]
Login

Artifact [b3b131c544]

Artifact b3b131c5441682d96e0cd30861ec58fc716f3b9e1722c7cd25c1ed110fef6e80:


name: Tests

on:
  push:
    branches: [main]
  pull_request:

jobs:
  test:
    name: Test (modernc)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-go@v5
        with:
          go-version-file: go.mod
      - name: Install Fossil
        run: sudo apt-get update && sudo apt-get install -y fossil
      - name: Unit tests
        run: GOWORK=off go test $(GOWORK=off go list ./... | grep -v '/dst') -count=1 -timeout=120s
      - name: DST
        run: GOWORK=off go test ./dst/... -count=1 -timeout=300s
      - name: Driver tests (modernc)
        run: cd db/driver/modernc && GOWORK=off go test ./... -count=1
      - name: Vet
        run: GOWORK=off go vet ./...
      - name: Build libfossil binary
        run: GOWORK=off go build ./cmd/libfossil/

  test-ncruces:
    name: Test (ncruces)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-go@v5
        with:
          go-version-file: go.mod
      - name: Install Fossil
        run: sudo apt-get update && sudo apt-get install -y fossil
      - name: Unit tests (ncruces)
        run: GOWORK=off go test -tags test_ncruces $(GOWORK=off go list ./... | grep -v '/dst' | grep -v 'cmd/libfossil') -count=1 -timeout=120s
      - name: DST (ncruces)
        run: GOWORK=off go test -tags test_ncruces ./dst/... -count=1 -timeout=300s
      - name: Driver tests (ncruces)
        run: cd db/driver/ncruces && GOWORK=off go test ./... -count=1

  test-otel:
    name: Test (observer/otel)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-go@v5
        with:
          go-version-file: go.mod
      - name: OTel sub-module tests
        run: cd observer/otel && GOWORK=off go test ./... -count=1