File tree Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ pull_request :
5+ push :
6+ branches :
7+ - main
8+
9+ jobs :
10+ test :
11+ runs-on : ubuntu-latest
12+ env :
13+ # Ensure DuckDB has a writable home inside the runner; tests may rely on this.
14+ DUCKDB_HOME : ${{ runner.temp }}/duckdb-home
15+ GOFLAGS : -mod=mod
16+ steps :
17+ - name : Checkout
18+ uses : actions/checkout@v4
19+
20+ - name : Set up Go
21+ uses : actions/setup-go@v4
22+ with :
23+ go-version : 1.24.2
24+
25+ - name : Cache Go modules
26+ uses : actions/cache@v4
27+ with :
28+ path : |
29+ ~/.cache/go-build
30+ ${{ env.GOMODCACHE }}
31+ key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
32+ restore-keys : |
33+ ${{ runner.os }}-go-
34+
35+ - name : Ensure DUCKDB_HOME exists
36+ run : mkdir -p "${{ env.DUCKDB_HOME }}"
37+
38+ - name : Install system build deps
39+ run : |
40+ sudo apt-get update
41+ sudo apt-get install -y build-essential pkg-config
42+
43+ - name : Run tests
44+ run : |
45+ # run all tests with verbose output
46+ go test ./... -v
47+
48+ - name : Build and run examples
49+ run : |
50+ # Build any example packages under ./example
51+ for pkg in $(go list ./... | grep '/example' || true); do
52+ echo "Building $pkg"
53+ go build -v "$pkg"
54+ echo "Running $pkg"
55+ ./"$pkg"
56+ done
You can’t perform that action at this time.
0 commit comments