Skip to content

Commit

Permalink
Convert to go mod (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajlake authored Apr 9, 2020
1 parent a2a34ed commit 2bb8a4a
Show file tree
Hide file tree
Showing 17 changed files with 169 additions and 337 deletions.
82 changes: 24 additions & 58 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,66 +1,32 @@
common:
godel-cache:
key: &godel-cache-key v1-godel-cache-{{ checksum "godelw" }}-{{ checksum "godel/config/godel.yml" }}
<<: &restore-godel-cache
restore_cache:
keys:
- *godel-cache-key
<<: &save-godel-cache
save_cache:
key: *godel-cache-key
paths:
- ~/.godel
owner-repo: &owner-repo
owner-repo: palantir/go-githubapp

vendor-cache:
key: &vendor-cache-key v1-vendor-cache-{{ checksum "Gopkg.lock" }}
<<: &restore-vendor-cache
restore_cache:
keys:
- *vendor-cache-key
<<: &save-vendor-cache
save_cache:
key: *vendor-cache-key
paths:
- vendor
excutor: &executor
executor:
name: go/darwin-linux-no-cgo
version: 1.14-java-11-t41
<<: *owner-repo

test-results:
dir: &results-dir /tmp/test-results
<<: &store-results
store_test_results:
path: *results-dir
<<: &store-artifacts
store_artifacts:
path: *results-dir
destination: test-results
version: 2.1

### Jobs ###
orbs:
go: palantir/go@0.0.18
godel: palantir/godel@0.0.18

version: 2
jobs:
verify:
working_directory: /go/src/github.com/palantir/go-githubapp
environment:
TESTS_DIR: *results-dir
docker:
- image: circleci/golang:1.13.4-stretch
steps:
- checkout
- *restore-godel-cache
- run: ./godelw version
- *save-godel-cache
- *restore-vendor-cache
- run: ./godelw run-dep -- ensure -vendor-only
- *save-vendor-cache
- run: mkdir -p "${TESTS_DIR}"
- run: ./godelw verify --apply=false --junit-output="$TESTS_DIR/$CIRCLE_PROJECT_REPONAME-tests.xml"
- *store-results
- *store-artifacts

### Workflows ###
all-tags-filter: &all-tags-filter
filters:
tags:
only: /.*/

workflows:
version: 2
build:
verify-test:
jobs:
- verify:
filters: { tags: { only: /.*/ } }
- godel/verify:
name: verify
<<: *executor
<<: *all-tags-filter
- godel/test:
name: test
<<: *executor
<<: *all-tags-filter
238 changes: 0 additions & 238 deletions Gopkg.lock

This file was deleted.

13 changes: 0 additions & 13 deletions Gopkg.toml

This file was deleted.

3 changes: 1 addition & 2 deletions example/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ import (
"io/ioutil"

"github.com/palantir/go-baseapp/baseapp"
"github.com/palantir/go-githubapp/githubapp"
"github.com/pkg/errors"
"gopkg.in/yaml.v2"

"github.com/palantir/go-githubapp/githubapp"
)

type Config struct {
Expand Down
5 changes: 2 additions & 3 deletions example/issue_comment.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@ import (
"fmt"
"strings"

"github.com/google/go-github/github"
"github.com/google/go-github/v30/github"
"github.com/palantir/go-githubapp/githubapp"
"github.com/pkg/errors"
"github.com/rs/zerolog"

"github.com/palantir/go-githubapp/githubapp"
)

type PRCommentHandler struct {
Expand Down
3 changes: 1 addition & 2 deletions example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ import (

"github.com/gregjones/httpcache"
"github.com/palantir/go-baseapp/baseapp"
"github.com/palantir/go-githubapp/githubapp"
"github.com/rs/zerolog"
"goji.io/pat"

"github.com/palantir/go-githubapp/githubapp"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion githubapp/caching_client_creator.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package githubapp
import (
"fmt"

"github.com/google/go-github/github"
"github.com/google/go-github/v30/github"
lru "github.com/hashicorp/golang-lru"
"github.com/pkg/errors"
"github.com/shurcooL/githubv4"
Expand Down
Loading

0 comments on commit 2bb8a4a

Please sign in to comment.