From e50a308b18f7aaa812870ca1bdac1ba499bfbb90 Mon Sep 17 00:00:00 2001 From: Xwg Date: Sun, 25 Jun 2023 10:29:34 +0800 Subject: [PATCH] Add simple CI for go (#5) * Add unimplemented manifest method * Change gitignore and add CI for go * Change CI including paths --- .github/workflows/ci.yaml | 35 ++++++++++++++++++++++++++++++++ .gitignore | 3 +++ go/internal/manifest/manifest.go | 24 ++++++++++++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 00000000..f2c47ac3 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,35 @@ +name: Go CI + +on: + push: + -pachs: + -'go/**' + -'!cpp/**' + branches: + - main + pull_request: + -pachs: + -'go/**' + -'!cpp/**' + branches: + - main + +jobs: + test: + name: Test + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup Go + uses: actions/setup-go@v2 + with: + go-version: 1.18 + + - name: Install dependencies + run: cd go && go mod download + + - name: Run tests + run: cd go && go test -v ./... diff --git a/.gitignore b/.gitignore index 9e6df199..fd2db394 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,8 @@ cpp/build/* cpp/.vscode/* cpp/.cache/* +cpp/.idea/* +go/.vscode/* +go/.idea/* compile_commands.json CMakeUserPresets.json diff --git a/go/internal/manifest/manifest.go b/go/internal/manifest/manifest.go index c0843164..b884d914 100644 --- a/go/internal/manifest/manifest.go +++ b/go/internal/manifest/manifest.go @@ -48,3 +48,27 @@ type ManifestV2 struct { func (m *ManifestV2) Schema() *arrow.Schema { return m.schema } + +func (m *ManifestV2) AddScalarDataFiles(files ...*DataFile) { + m.files = append(m.files, files...) + +} + +func (m *ManifestV2) AddVectorDataFiles(files ...*DataFile) { + m.files = append(m.files, files...) +} + +func (m *ManifestV2) ScalarSchema() *arrow.Schema { + panic("implement me") + return nil +} + +func (m *ManifestV2) VectorSchema() *arrow.Schema { + panic("implement me") + return nil +} + +func WriteManifestV2File(fs fs.Fs, manifest *ManifestV2) error { + panic("implement me") + return nil +}