Skip to content

Commit

Permalink
minimal set of changes to bring things up to date.
Browse files Browse the repository at this point in the history
It's no longer necessary (or even useful) to go get the files as
go modules takes care of that for us.
  • Loading branch information
freeformz committed Aug 8, 2022
1 parent 4421a78 commit 5ed168c
Show file tree
Hide file tree
Showing 19 changed files with 27 additions and 145 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.14' ]
go: [ '1.18' ]
name: Build ${{ matrix.go }}
steps:
- uses: aws-actions/configure-aws-credentials@v1
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.14-alpine
FROM golang:1.18-alpine

COPY goroot/ /go/
# this is used to lint and build tarball
Expand Down
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,19 @@ git remote set-head origin -a
```

## Installation
`go get github.com/signalsciences/sigsci-module-golang`

```console
cd $(go env GOPATH)/src/github.com/signalsciences
git clone https://github.com/signalsciences/sigsci-module-golang.git
```

## Running tests

Must be logged into our ECR repo

```console
aws ecr get-login-password --region us-west-2 --profile sigsci_prod | docker login --username AWS --password-stdin 803688608479.dkr.ecr.us-west-2.amazonaws.com
```

## Example Code Snippet
```go
Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
module github.com/signalsciences/sigsci-module-golang

go 1.12
go 1.18

require (
github.com/mitchellh/mapstructure v1.1.2 // indirect
github.com/philhofer/fwd v1.0.0 // indirect
github.com/signalsciences/tlstext v1.2.0
github.com/tinylib/msgp v1.1.0
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/philhofer/fwd v1.0.0 h1:UbZqGr5Y38ApvM/V/jEljVxwocdweyH+vmYvRPBnbqQ=
github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU=
github.com/signalsciences/tlstext v1.2.0 h1:ps1ZCoDz93oMK0ySe7G/2J0dpTT32cN20U+/xy0S7uk=
Expand Down
6 changes: 6 additions & 0 deletions scripts/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

set -ex

(cd ./scripts/test-golang118 && ./test.sh)
(cd ./scripts/test-golang119 && ./test.sh)
58 changes: 0 additions & 58 deletions scripts/test-golang110/docker-compose.yml

This file was deleted.

44 changes: 0 additions & 44 deletions scripts/test-golang110/test.sh

This file was deleted.

7 changes: 0 additions & 7 deletions scripts/test-golang111/Dockerfile

This file was deleted.

15 changes: 0 additions & 15 deletions scripts/test-golang114/docker-compose.override.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
FROM golang:1.14-alpine

COPY goroot/ /go/
FROM golang:1.18-alpine

# we will mount the current directory here
VOLUME [ "/go/src/github.com/signalsciences/sigsci-module-golang" ]
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,5 @@ $DOCKERCOMPOSE pull --ignore-pull-failures
if [ -d "goroot" ]; then
rm -rf goroot
fi
docker run -v ${PWD}/goroot:/go/ --rm golang:1.14-alpine /bin/sh -c 'apk --update add git && go get github.com/signalsciences/tlstext && go get github.com/tinylib/msgp && go get github.com/alecthomas/gometalinter'
$DOCKERCOMPOSE up --no-color --build --abort-on-container-exit --exit-code-from mtest > /dev/null

Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
FROM golang:1.10.6-alpine3.8

COPY goroot/ /go/
FROM golang:1.19-alpine

# we will mount the current directory here
VOLUME [ "/go/src/github.com/signalsciences/sigsci-module-golang" ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,6 @@ services:
- DISABLE_NOCOOKIE=1
- MTEST_BASEURL=web:8085
- MTEST_AGENT=agent:12345
- "MTEST_RUN_TEST_BLOCK_VIA_REDIRECT=true"
command: [ "/bin/wait-for", "web:8085", "--", "/bin/mtest", "-test.v" ]

Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,5 @@ $DOCKERCOMPOSE pull --ignore-pull-failures
# > /dev/null --> output of all servers is mixed together and ugly
# we get the individual logs at end
#
if [ -d "goroot" ]; then
rm -rf goroot
fi
docker run -v ${PWD}/goroot:/go/ --rm golang:1.11.3-alpine3.8 /bin/sh -c 'apk --update add git && go get github.com/signalsciences/tlstext && go get github.com/tinylib/msgp && go get github.com/alecthomas/gometalinter'
$DOCKERCOMPOSE up --no-color --build --abort-on-container-exit --exit-code-from mtest > /dev/null

5 changes: 2 additions & 3 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@

set -ex

(cd ./scripts/test-golang110 && ./test.sh)
(cd ./scripts/test-golang111 && ./test.sh)
(cd ./scripts/test-golang114 && ./test.sh)
(cd ./scripts/test-golang118 && ./test.sh)
(cd ./scripts/test-golang119 && ./test.sh)

0 comments on commit 5ed168c

Please sign in to comment.