-
Notifications
You must be signed in to change notification settings - Fork 15
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 #37 from gliderlabs/update-circleci
Switch to Github Actions for CI
- Loading branch information
Showing
8 changed files
with
135 additions
and
38 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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
version: 2.1 | ||
|
||
jobs: | ||
test: | ||
docker: | ||
- image: circleci/golang:1.12 | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
keys: | ||
- go-mod-v4-{{ checksum "go.sum" }} | ||
- run: | ||
name: Prepare environment | ||
command: make deps build | ||
- run: | ||
name: Run unit tests | ||
command: make test | ||
- run: | ||
name: Prepare artifacts | ||
command: | | ||
mkdir -p build/workspace/ | ||
tar -czvf build/workspace/go-workspace.tgz -C ~/.go_workspace . | ||
- save_cache: | ||
key: go-mod-v4-{{ checksum "go.sum" }} | ||
paths: | ||
- "/go/pkg/mod" | ||
- store_artifacts: | ||
path: build | ||
destination: build | ||
|
||
release: | ||
docker: | ||
- image: circleci/golang:1.12 | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
keys: | ||
- go-mod-v4-{{ checksum "go.sum" }} | ||
- run: | ||
name: Release | ||
command: | | ||
echo "make deps build release" | ||
workflows: | ||
build: | ||
jobs: | ||
- test | ||
- release: | ||
filters: | ||
branches: | ||
only: | ||
- release |
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,7 @@ | ||
--- | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "gomod" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" |
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,35 @@ | ||
--- | ||
name: ci | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- '*' | ||
push: | ||
branches: | ||
- 'master' | ||
- 'release' | ||
|
||
jobs: | ||
ci: | ||
name: ci | ||
runs-on: ubuntu-18.04 | ||
strategy: | ||
fail-fast: true | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: '1.17.3' | ||
- run: make deps build | ||
- run: make test | ||
- name: upload packages | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: build | ||
path: build/**/* | ||
- name: make release-in-docker | ||
run: | | ||
if [[ "${GITHUB_REF#refs/heads/}" == "release" ]]; then | ||
make deps build release | ||
fi |
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 was deleted.
Oops, something went wrong.
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,14 @@ | ||
module glidergun | ||
|
||
go 1.17 | ||
|
||
require ( | ||
github.com/progrium/go-basher v5.1.4+incompatible | ||
gopkg.in/inconshreveable/go-update.v0 v0.0.0-20150814200126-d8b0b1d421aa | ||
) | ||
|
||
require ( | ||
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 // indirect | ||
github.com/kr/binarydist v0.1.0 // indirect | ||
github.com/mitchellh/go-homedir v1.1.0 // indirect | ||
) |
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 @@ | ||
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 h1:iQTw/8FWTuc7uiaSepXwyf3o52HaUYcV+Tu66S3F5GA= | ||
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= | ||
github.com/kr/binarydist v0.1.0 h1:6kAoLA9FMMnNGSehX0s1PdjbEaACznAv/W219j2uvyo= | ||
github.com/kr/binarydist v0.1.0/go.mod h1:DY7S//GCoz1BCd0B0EVrinCKAZN3pXe+MDaIZbXQVgM= | ||
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= | ||
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= | ||
github.com/progrium/go-basher v5.1.4+incompatible h1:23t6SIRLGNmrb3NfVX5t8jpxXywRnvgI7If38mKiFso= | ||
github.com/progrium/go-basher v5.1.4+incompatible/go.mod h1:Oiy7jZEU1mm+gI1dt5MKYwxptmD37q8/UupxnwhMHtI= | ||
gopkg.in/inconshreveable/go-update.v0 v0.0.0-20150814200126-d8b0b1d421aa h1:drvf2JoUL1fz3ttkGNkw+rf3kZa2//7XkYGpSO4NHNA= | ||
gopkg.in/inconshreveable/go-update.v0 v0.0.0-20150814200126-d8b0b1d421aa/go.mod h1:tuNm0ntQ7IH9VSA39XxzLMpee5c2DwgIbjD4x3ydo8Y= |
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