Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
146 additions
and
35 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,56 @@ | ||
name: Go | ||
on: [push] | ||
#on: | ||
# push: | ||
# branches: | ||
# - master | ||
jobs: | ||
version: | ||
name: Generate build number | ||
runs-on: macos-latest | ||
steps: | ||
- name: Generate build number | ||
id: buildnumber | ||
uses: einaregilsson/build-number@v1 | ||
with: | ||
token: ${{secrets.github_token}} | ||
- name: Upload build number | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: BUILD_NUMBER | ||
path: BUILD_NUMBER | ||
|
||
build: | ||
name: Build | ||
runs-on: macos-latest | ||
strategy: | ||
matrix: | ||
os: [linux, darwin, windows] | ||
arch: [arm, amd64, 386] | ||
|
||
- name: Download build number | ||
uses: actions/download-artifact@v1 | ||
with: | ||
name: BUILD_NUMBER | ||
- name: Restore build number | ||
id: buildnumber | ||
uses: einaregilsson/build-number@v1 | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v1 | ||
|
||
- name: Build | ||
env: | ||
GOOS: ${{ matrix.os }} | ||
GOARCH: ${{ matrix.arch }} | ||
with: | ||
BUILD_NUMBER | ||
run: | | ||
go tool dist install pkg/runtime | ||
go install -a std | ||
go build -o build/emitter-${{ matrix.os }}-${{ matrix.arch }} -i -ldflags "-X github.com/emitter-io/emitter/internal/command/version.version=$BUILD_VERSION -X github.com/emitter-io/emitter/internal/command/version.commit=$GITHUB_SHA" . |
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,37 @@ | ||
name: Go | ||
on: [push] | ||
env: | ||
PROJECT: "github.com/emitter-io/emitter" | ||
GO111MODULE: "on" | ||
|
||
jobs: | ||
|
||
test: | ||
name: Test | ||
runs-on: macos-latest | ||
steps: | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.13 | ||
id: go | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v1 | ||
|
||
- name: Get dependencies | ||
run: | | ||
go install golang.org/x/tools/cmd/cover | ||
go install github.com/mattn/goveralls | ||
go install github.com/go-playground/overalls | ||
go get -v -t -d ./... | ||
- name: Run tests and calculate code coverage | ||
run: | | ||
export PATH=$PATH:$(go env GOPATH)/bin | ||
#export EMITTER=$(go env GOPATH)/src/$PROJECT | ||
#mkdir -p $EMITTER && shopt -s dotglob && mv ./* $EMITTER && cd $EMITTER | ||
#overalls -project=$PROJECT -covermode=atomic -- -race | ||
#goveralls -coverprofile=overalls.coverprofile -service=github -repotoken=${{ secrets.COVERALLS_TOKEN }} | ||
goveralls -debug -service=github-actions -race -covermode=atomic -repotoken=${{ secrets.COVERALLS_TOKEN }} |
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
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
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
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
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