Skip to content

Commit

Permalink
Merge pull request #33 from signalsciences/ffz/minimalUpToData
Browse files Browse the repository at this point in the history
minimal set of changes to bring things up to date.
  • Loading branch information
freeformz authored Aug 9, 2022
2 parents 4421a78 + 290ff97 commit 9c9764c
Show file tree
Hide file tree
Showing 18 changed files with 20 additions and 35 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
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ git remote set-head origin -a
```

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

```console
go get github.com/signalsciences/sigsci-module-golang@latest
```

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

go 1.12
go 1.13

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
)

require github.com/philhofer/fwd v1.0.0 // indirect
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
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.17-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 @@ -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.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.18-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

Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
FROM golang:1.11.3-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,6 +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
@@ -1,5 +1,5 @@
#!/bin/bash
set -ex
set -e

DOCKERCOMPOSE="docker-compose"

Expand All @@ -20,6 +20,8 @@ cleanup() {
}
trap cleanup 0 1 2 3 6

set -x

# attempt to clean up any leftover junk
$DOCKERCOMPOSE down

Expand All @@ -35,10 +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.10.6-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

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

set -ex

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

0 comments on commit 9c9764c

Please sign in to comment.