diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..f47394e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,38 @@ +name: ci + +on: + push: + branches: + - master + pull_request: + +permissions: + contents: read + +env: + goVersion: 1.19 + mongodbVersion: 4.2 + +jobs: + test-unit: + name: test-unit + runs-on: ubuntu-latest + steps: + - uses: actions/setup-go@v3 + with: + go-version: ${{ env.goVersion }} + - uses: actions/checkout@v3 + - run: make test/unit + + test-integration: + name: test-integration + runs-on: ubuntu-latest + steps: + - uses: supercharge/mongodb-github-action@1.8.0 + with: + mongodb-version: ${{ env.mongodbVersion }} + - uses: actions/setup-go@v3 + with: + go-version: ${{ env.goVersion }} + - uses: actions/checkout@v3 + - run: make test/integration diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 3433b40..0000000 --- a/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -env: - global: - - CC_TEST_REPORTER_ID=aa591e48dd3f08c8dd398d5dac90c4a4d4d32f0e359a932c035ea65a2b005efd - -language: go - -services: - - mongodb - -before_install: - - go get -t -v ./... - -before_script: - # Let code climate know that we are preparing to send a report - - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter - - chmod +x ./cc-test-reporter - - ./cc-test-reporter before-build - -script: - # Run tests + generate coverage - - make test/cc - -after_script: - # Send coverage report to code climate - - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT \ No newline at end of file diff --git a/checkers/mongo/mongo_test.go b/checkers/mongo/mongo_test.go index 10167d7..cb7f90c 100644 --- a/checkers/mongo/mongo_test.go +++ b/checkers/mongo/mongo_test.go @@ -1,3 +1,5 @@ +//go:build integration + package mongochk import ( diff --git a/go.mod b/go.mod index 948a89d..240a342 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/sirupsen/logrus v1.4.2 // indirect github.com/stretchr/testify v1.4.0 github.com/yuin/gopher-lua v0.0.0-20190514113301-1cd887cd7036 // indirect - github.com/zaffka/mongodb-boltdb-mock v0.0.0-20180816124423-49954d88fa3e + github.com/zaffka/mongodb-boltdb-mock v0.0.0-20221014194232-b4bb03fbe3a0 ) go 1.13 diff --git a/go.sum b/go.sum index 047d278..b05afb2 100644 --- a/go.sum +++ b/go.sum @@ -15,7 +15,6 @@ github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b/go.mod h1:H0wQ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -52,13 +51,12 @@ github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJy github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/yuin/gopher-lua v0.0.0-20190514113301-1cd887cd7036 h1:1b6PAtenNyhsmo/NKXVe34h7JEZKva1YB/ne7K7mqKM= github.com/yuin/gopher-lua v0.0.0-20190514113301-1cd887cd7036/go.mod h1:gqRgreBUhTSL0GeU64rtZ3Uq3wtjOa/TB2YfrtkCbVQ= -github.com/zaffka/mongodb-boltdb-mock v0.0.0-20180816124423-49954d88fa3e h1:SAWaLuuQkrnxHsFS9l0ZnnxCFeI9okwNk5hteWxrNNg= -github.com/zaffka/mongodb-boltdb-mock v0.0.0-20180816124423-49954d88fa3e/go.mod h1:GsDD1qsG+86MeeCG7ndi6Ei3iGthKL3wQ7PTFigDfNY= +github.com/zaffka/mongodb-boltdb-mock v0.0.0-20221014194232-b4bb03fbe3a0 h1:25CxwNe/bwECkbtsSKrh3XWF3lg59JTIjfwttIW6gyY= +github.com/zaffka/mongodb-boltdb-mock v0.0.0-20221014194232-b4bb03fbe3a0/go.mod h1:GsDD1qsG+86MeeCG7ndi6Ei3iGthKL3wQ7PTFigDfNY= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd h1:nTDtHvHSdCn1m6ITfMRqtOd/9+7a3s8RBNOZ3eYZzJA= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e h1:o3PsSEY8E4eXWkXrIP9YJALUkVZqzHJT5DOasTyn8Vs= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190204203706-41f3e6584952/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190422165155-953cdadca894 h1:Cz4ceDQGXuKRnVBDTS23GTn/pU5OE2C0WrNTOYK1Uuc= diff --git a/in-repo.yaml b/in-repo.yaml index 9fe1065..ec48840 100644 --- a/in-repo.yaml +++ b/in-repo.yaml @@ -1,8 +1,13 @@ +specVersion: v1 +visibility: public + owner: active: - team: core + team: platform-sre-eng + since: 2022-10-18 + history: + - team: core since: 2017-12-01 code-coverage: # please see https://invisionapp.atlassian.net/wiki/spaces/ICT/pages/888799838/Establishing+code+coverage+goals for how to set this value appropriately goal-percent: 100 -visibility: private