Skip to content

Nightly Full Tests #151

Nightly Full Tests

Nightly Full Tests #151

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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version-file: 'go.mod'
- 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 -tags gms_pure_go ./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,gms_pure_go -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@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6
if: success()
continue-on-error: true
with:
file: ./coverage.out
fail_ci_if_error: false