Skip to content

Commit

Permalink
Merge pull request #282 from taniabogatsch/improve-scalar-udf-examples
Browse files Browse the repository at this point in the history
Include the examples in the CI test workflow
  • Loading branch information
taniabogatsch authored Sep 24, 2024
2 parents 94736e3 + 51b97ad commit 8351c03
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,39 @@ on:
workflow_dispatch:

jobs:
test:
go_test:
name: Test
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash

strategy:
matrix:
os: [ubuntu-latest, macos-latest]
go: ["1.23"]
fail-fast: false

steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: "Run tests"
run: make test

test_examples:
name: Test examples
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: "Test examples"
run: make examples

- name: "Run Tests"
run: make test
freebsd_amd64:
runs-on: ubuntu-latest
steps:
Expand All @@ -39,5 +50,4 @@ jobs:
gmake \
git \
go
run: gmake test
2 changes: 1 addition & 1 deletion examples/scalar_udf/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func myLengthScalarUDFSet() {
check(db.Close())
}

// appendSum takes a VARCHAR prefix, a VARCHAR suffix, and a variadic number of integer values.
// wrapSum takes a VARCHAR prefix, a VARCHAR suffix, and a variadic number of integer values.
// It computes the sum of the integer values. Then, it emits a VARCHAR by concatenating prefix || sum || suffix.

type wrapSum struct{}
Expand Down

0 comments on commit 8351c03

Please sign in to comment.