diff --git a/.circleci/config.yml b/.circleci/config.yml index 1b71f53..1237e90 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,28 +11,34 @@ jobs: <<: *job_template steps: - checkout + - run: curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh + - run: dep ensure - run: echo "deb http://deb.debian.org/debian unstable main" >> /etc/apt/sources.list - run: apt-get update && apt-get install -y python3.5-dev - run: cp /usr/lib/x86_64-linux-gnu/pkgconfig/python-3.5.pc /usr/lib/x86_64-linux-gnu/pkgconfig/python3.pc - - run: cd test && go build && ./test + - run: go test -cover python3.6: <<: *job_template steps: - checkout + - run: curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh + - run: dep ensure - run: echo "deb http://deb.debian.org/debian unstable main" >> /etc/apt/sources.list - run: apt-get update && apt-get install -y python3.6-dev - run: cp /usr/lib/x86_64-linux-gnu/pkgconfig/python-3.6.pc /usr/lib/x86_64-linux-gnu/pkgconfig/python3.pc - - run: cd test && go build && ./test + - run: go test -cover python3.7: <<: *job_template steps: - checkout + - run: curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh + - run: dep ensure - run: echo "deb http://deb.debian.org/debian unstable main" >> /etc/apt/sources.list - run: apt-get update && apt-get install -y python3.7-dev - run: cp /usr/lib/x86_64-linux-gnu/pkgconfig/python-3.7.pc /usr/lib/x86_64-linux-gnu/pkgconfig/python3.pc - - run: cd test && go build && ./test + - run: go test -cover workflows: version: 2 diff --git a/Gopkg.lock b/Gopkg.lock new file mode 100644 index 0000000..06b518b --- /dev/null +++ b/Gopkg.lock @@ -0,0 +1,33 @@ +# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. + + +[[projects]] + digest = "1:ffe9824d294da03b391f44e1ae8281281b4afc1bdaa9588c9097785e3af10cec" + name = "github.com/davecgh/go-spew" + packages = ["spew"] + pruneopts = "UT" + revision = "8991bc29aa16c548c550c7ff78260e27b9ab7c73" + version = "v1.1.1" + +[[projects]] + digest = "1:0028cb19b2e4c3112225cd871870f2d9cf49b9b4276531f03438a88e94be86fe" + name = "github.com/pmezard/go-difflib" + packages = ["difflib"] + pruneopts = "UT" + revision = "792786c7400a136282c1664665ae0a8db921c6c2" + version = "v1.0.0" + +[[projects]] + digest = "1:18752d0b95816a1b777505a97f71c7467a8445b8ffb55631a7bf779f6ba4fa83" + name = "github.com/stretchr/testify" + packages = ["assert"] + pruneopts = "UT" + revision = "f35b8ab0b5a2cef36673838d662e249dd9c94686" + version = "v1.2.2" + +[solve-meta] + analyzer-name = "dep" + analyzer-version = 1 + input-imports = ["github.com/stretchr/testify/assert"] + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml new file mode 100644 index 0000000..844c8e7 --- /dev/null +++ b/Gopkg.toml @@ -0,0 +1,7 @@ +[prune] + go-tests = true + unused-packages = true + +[[constraint]] + name = "github.com/stretchr/testify" + version = "1.2.2" diff --git a/test/main.go b/test/main.go deleted file mode 100644 index 8c8fbe9..0000000 --- a/test/main.go +++ /dev/null @@ -1,18 +0,0 @@ -package main - -/* -#cgo pkg-config: python3 -#include "Python.h" -*/ -import "C" - -import ( - "fmt" - python "github.com/DataDog/go-python3" -) - -func main() { - C.Py_Initialize() - ret, err := python.PyRun_AnyFile("test.py") - fmt.Printf("%d %v\n", ret, err) -} diff --git a/test/test.py b/test/test.py deleted file mode 100644 index cfdbc6d..0000000 --- a/test/test.py +++ /dev/null @@ -1,3 +0,0 @@ -import sys - -print(sys.version)