Skip to content

Resolve libchdb reliably and verify each commit as a published module #82

Resolve libchdb reliably and verify each commit as a published module

Resolve libchdb reliably and verify each commit as a published module #82

Workflow file for this run

name: chDB-go
on:
pull_request:
branches: [ "main" ]
paths-ignore:
- '**/.md'
push:
branches: [ "main" ]
paths-ignore:
- '**/.md'
jobs:
build_linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Fetch library
run: |
make install
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.21"
- name: Build
run: |
go mod tidy
make build
- name: Test
run: make test
- name: Test with race detector
run: go test -race -timeout=180s ./...
- name: Test main
run: ./chdb-go "SELECT 12345"
build_mac:
runs-on: macos-14
steps:
- uses: actions/checkout@v3
- name: Fetch library
run: |
make install
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.21"
- name: Build
run: |
go mod tidy
make build
- name: Test
run: make test
- name: Test with race detector
run: go test -race -timeout=180s ./...
- name: Test main
run: ./chdb-go "SELECT 12345"
# Building and testing inside the repository does not prove that what users
# download works. This job packages the commit the way the module proxy does
# and consumes it from outside the repository, which catches a build that
# needs an uncommitted file or that embeds a path from the build machine.
consume_as_published_module:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-14]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21"
- name: Consume as a published module
run: .github/scripts/verify-as-user.sh