You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@age.apache.org by jg...@apache.org on 2022/12/28 17:43:18 UTC

[age] branch PG12 updated (dd34ea5 -> e7465ae)

This is an automated email from the ASF dual-hosted git repository.

jgemignani pushed a change to branch PG12
in repository https://gitbox.apache.org/repos/asf/age.git


    from dd34ea5  Fix compare_agtype_scalar_values returned result
     new 1d1254a  Implement CI testing for Golang Driver (#372)
     new e7465ae  Update to go version 1.19, as 1.16 is EOL (#373)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/go-driver.yml   | 36 ++++++++++++++++++++++++++++++++++++
 drivers/golang/README.md          |  2 +-
 drivers/golang/docker-compose.yml | 10 ++++++++++
 drivers/golang/go.mod             |  8 +++++++-
 drivers/golang/go.sum             |  1 +
 5 files changed, 55 insertions(+), 2 deletions(-)
 create mode 100644 .github/workflows/go-driver.yml
 create mode 100644 drivers/golang/docker-compose.yml


[age] 01/02: Implement CI testing for Golang Driver (#372)

Posted by jg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jgemignani pushed a commit to branch PG12
in repository https://gitbox.apache.org/repos/asf/age.git

commit 1d1254a8938dd1cd87f82ad2849900d472ebb854
Author: Luke Hinds <70...@users.noreply.github.com>
AuthorDate: Mon Nov 28 18:51:52 2022 +0000

    Implement CI testing for Golang Driver (#372)
    
    This change will implement running of the go driver unit tests
    upon every pull commit made to the `drivers/golang` code.
    
    It uses the `paths` directive to ensure the github action workflow
    only runs when the go driver code is changed.
    
    The docker-compose file is required to instaniate a postgres
    instance, needed for unit testing.
---
 .github/workflows/go-driver.yml   | 33 +++++++++++++++++++++++++++++++++
 drivers/golang/docker-compose.yml | 10 ++++++++++
 2 files changed, 43 insertions(+)

diff --git a/.github/workflows/go-driver.yml b/.github/workflows/go-driver.yml
new file mode 100644
index 0000000..52febad
--- /dev/null
+++ b/.github/workflows/go-driver.yml
@@ -0,0 +1,33 @@
+name: Go Driver Tests
+
+on:
+  push:
+    branches: [ "master" ]
+    paths: 
+      - 'drivers/golang'
+  pull_request:
+    branches: [ "master" ]
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    defaults:
+      run:
+        working-directory: drivers/golang/age/
+  
+    steps:
+    - uses: actions/checkout@v3
+    
+    - name: Run apache/age docker image
+      run: docker-compose up -d
+
+    - name: Set up Go
+      uses: actions/setup-go@v3
+      with:
+        go-version: 1.16
+
+    - name: Build
+      run: go build -v ./...
+
+    - name: Test
+      run: go test . -v
diff --git a/drivers/golang/docker-compose.yml b/drivers/golang/docker-compose.yml
new file mode 100644
index 0000000..668eb19
--- /dev/null
+++ b/drivers/golang/docker-compose.yml
@@ -0,0 +1,10 @@
+version: "3.3"
+services:
+  db:
+    image: apache/age
+    environment:
+      - POSTGRES_USER=postgres
+      - POSTGRES_PASSWORD=agens
+      - POSTGRES_DB=postgres
+    ports:
+      - 5432:5432
\ No newline at end of file


[age] 02/02: Update to go version 1.19, as 1.16 is EOL (#373)

Posted by jg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jgemignani pushed a commit to branch PG12
in repository https://gitbox.apache.org/repos/asf/age.git

commit e7465ae1e56950567cbc306e627d35dbaac11d1f
Author: Luke Hinds <70...@users.noreply.github.com>
AuthorDate: Sat Dec 10 01:14:51 2022 +0000

    Update to go version 1.19, as 1.16 is EOL (#373)
    
    * Update to go version 1.19, as 1.16 is EOL
    
    The current version of the driver is 1.16 which went EOL Feb 2021
    
    This upgrades to 1.19 and also configures CI to retrospectively
    test back to 1.18 (1.17 is EOL). This will give test coverage
    for all actively supported go versions.
    
    * Also update readme go version
---
 .github/workflows/go-driver.yml | 5 ++++-
 drivers/golang/README.md        | 2 +-
 drivers/golang/go.mod           | 8 +++++++-
 drivers/golang/go.sum           | 1 +
 4 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/go-driver.yml b/.github/workflows/go-driver.yml
index 52febad..25fcf77 100644
--- a/.github/workflows/go-driver.yml
+++ b/.github/workflows/go-driver.yml
@@ -11,6 +11,9 @@ on:
 jobs:
   build:
     runs-on: ubuntu-latest
+    strategy:
+      matrix:
+        go-version: [ '1.18', '1.19' ]
     defaults:
       run:
         working-directory: drivers/golang/age/
@@ -24,7 +27,7 @@ jobs:
     - name: Set up Go
       uses: actions/setup-go@v3
       with:
-        go-version: 1.16
+        go-version: ${{ matrix.go-version }}
 
     - name: Build
       run: go build -v ./...
diff --git a/drivers/golang/README.md b/drivers/golang/README.md
index 1d58fa6..4433212 100644
--- a/drivers/golang/README.md
+++ b/drivers/golang/README.md
@@ -7,7 +7,7 @@ AGType parser and driver support for [Apache AGE](https://age.apache.org/), grap
 * Cypher query support for 3rd. Party sql driver (enables to use cypher queries directly)
 
 ### Prerequisites
-* over Go 1.16
+* over Go 1.18 / 1.19
 * This module runs on golang standard api [database/sql](https://golang.org/pkg/database/sql/) and [antlr4-python3](https://github.com/antlr/antlr4/tree/master/runtime/Go/antlr)
 
 
diff --git a/drivers/golang/go.mod b/drivers/golang/go.mod
index 81525d6..a6bd74b 100644
--- a/drivers/golang/go.mod
+++ b/drivers/golang/go.mod
@@ -19,10 +19,16 @@
 
 module github.com/apache/age/drivers/golang
 
-go 1.16
+go 1.19
 
 require (
 	github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210521184019-c5ad59b459ec
 	github.com/lib/pq v1.10.2
 	github.com/stretchr/testify v1.7.0
 )
+
+require (
+	github.com/davecgh/go-spew v1.1.0 // indirect
+	github.com/pmezard/go-difflib v1.0.0 // indirect
+	gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
+)
diff --git a/drivers/golang/go.sum b/drivers/golang/go.sum
index 13a472e..89d1775 100644
--- a/drivers/golang/go.sum
+++ b/drivers/golang/go.sum
@@ -9,6 +9,7 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
 github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
 github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
 github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
 gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
 gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=