Skip to content

Nightly Full Tests

Nightly Full Tests #3

Workflow file for this run

name: Nightly Full Tests
on:
schedule:
# Run at 2am UTC daily
- cron: '0 2 * * *'
workflow_dispatch: # Allow manual trigger
jobs:
full-test:
name: Full Test Suite
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: 'go.mod'
- name: Install ICU4C
run: |
sudo apt-get update
sudo apt-get install -y libicu-dev
- name: Install Dolt
run: |
curl -L https://github.com/dolthub/dolt/releases/latest/download/install.sh | sudo bash
- name: Configure Git and Dolt identity
run: |
git config --global user.name "CI Bot"
git config --global user.email "ci@beads.test"
dolt config --global --add user.name "CI Bot"
dolt config --global --add user.email "ci@beads.test"
- name: Build
run: go build -v ./cmd/bd
- name: Full Test Suite (including integration tests)
env:
# Skip Docker-based Dolt testcontainer tests — they hang in
# GitHub Actions (known issue, see scripts/repro-dolt-hang/).
# Non-Docker integration tests still run via the installed dolt binary.
BEADS_TEST_SKIP: dolt
run: go test -v -race -tags=integration -coverprofile=coverage.out -timeout=30m ./...
- name: Check coverage threshold
run: |
COVERAGE=$(go tool cover -func=coverage.out | grep total | awk '{print $3}' | sed 's/%//')
echo "Coverage: $COVERAGE%"
# Threshold is lower (30%) because Docker-based Dolt integration
# tests are skipped in CI (BEADS_TEST_SKIP=dolt). With Docker
# tests included, coverage would be ~50%+.
if (( $(echo "$COVERAGE < 30" | bc -l) )); then
echo "❌ Coverage is below 30% threshold"
exit 1
elif (( $(echo "$COVERAGE < 40" | bc -l) )); then
echo "⚠️ Coverage is below 40% (warning threshold)"
else
echo "✅ Coverage meets threshold"
fi
- name: Upload coverage
uses: codecov/codecov-action@v6
if: success()
with:
file: ./coverage.out
fail_ci_if_error: false