-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from mikaint/run_with_docker
Run with docker
- Loading branch information
Showing
4 changed files
with
48 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,28 @@ | ||
language: go | ||
|
||
go: | ||
- "1.11.x" | ||
- "1.12.x" | ||
|
||
services: | ||
- docker | ||
os: | ||
- linux | ||
- osx | ||
|
||
before_script: | ||
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.16.0 | ||
|
||
script: | ||
- golangci-lint run | ||
- go test ./... -race -coverprofile=coverage.txt -covermode=atomic | ||
- go install | ||
- mkdir hugo && cd hugo && wget https://raw.githubusercontent.com/gohugoio/hugo/v0.53/go.mod | ||
- env GO111MODULE=on go list -u -m -json all | go-mod-outdated | ||
|
||
after_success: | ||
- bash <(curl -s https://codecov.io/bash) | ||
language: go | ||
go: | ||
- 1.11.x | ||
- 1.12.x | ||
jobs: | ||
include: | ||
- | ||
after_success: | ||
- "bash <(curl -s https://codecov.io/bash)" | ||
before_script: | ||
- "curl sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.16.0" | ||
script: | ||
- "golangci-lint run" | ||
- "go test ./... -race -coverprofile=coverage.txt -covermode=atomic" | ||
- "go install" | ||
- "mkdir hugo && cd hugo && wget https://raw.githubusercontent.com/gohugoio/hugo/v0.53/go.mod" | ||
- "env GO111MODULE=on go list -u -m -json all | go-mod-outdated" | ||
stage: "testing" | ||
- | ||
script: | ||
- "docker build -t psampaz/go-mod-outdated ." | ||
- "go list -u -m -json all | docker run --rm -i psampaz/go-mod-outdated" | ||
stage: "docker" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM golang:1.12.7-alpine3.10 | ||
RUN apk add --no-cache git | ||
WORKDIR /home | ||
COPY ./ . | ||
RUN CGO_ENABLED=0 GOOS=linux go build -o go-mod-outdated . | ||
|
||
FROM scratch | ||
WORKDIR /home/ | ||
COPY --from=0 /home/go-mod-outdated . | ||
ENTRYPOINT ["./go-mod-outdated"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters