-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* migrate CI to github actions * add binaries to gitignore * update linter configuration * update go version to 1.17 * create new useful commands and set default one on makefile * create working drand network on docker compose * update go version on generate CI workflow * set go and go grpc protobuf version on Makefile * update golangci-lint version * fix issues reported by linter * add build/test job to be run on PRs too
- Loading branch information
1 parent
a2ba475
commit eeaae0a
Showing
24 changed files
with
436 additions
and
142 deletions.
There are no files selected for viewing
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
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,35 @@ | ||
name: "Publish image" | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
|
||
jobs: | ||
deploy: | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: '^1.16' | ||
- uses: actions/cache@v2 | ||
id: cache | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Build and push Docker image | ||
run: | | ||
docker build --build-arg version=`git describe --tags` --build-arg gitCommit=`git rev-parse HEAD` -t drandorg/go-drand:latest . | ||
echo $DOCKER_PWD | docker login -u $DOCKER_LOGIN --password-stdin | ||
docker push drandorg/go-drand:latest | ||
env: | ||
DOCKER_PWD: ${{ secrets.DOCKER_PWD }} | ||
DOCKER_LOGIN: ${{ secrets.DOCKER_LOGIN }} |
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: "Publish tagged image" | ||
|
||
on: | ||
release: | ||
types: | ||
- created | ||
tags: | ||
- "v[0-9]+(\\.[0-9]+)*" | ||
|
||
jobs: | ||
tagged-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: '^1.16' | ||
- uses: actions/cache@v2 | ||
id: cache | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Build and push tagged Docker image | ||
run: | | ||
docker build --build-arg version=`git describe --tags` --build-arg gitCommit=`git rev-parse HEAD` -t drandorg/go-drand:`git describe --tags` . | ||
echo $DOCKER_PWD | docker login -u $DOCKER_LOGIN --password-stdin | ||
docker push drandorg/go-drand:`git describe --tags` | ||
env: | ||
DOCKER_PWD: ${{ secrets.DOCKER_PWD }} | ||
DOCKER_LOGIN: ${{ secrets.DOCKER_LOGIN }} |
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,76 @@ | ||
name: "Build/Tests" | ||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
- name: Install Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: '^1.16' | ||
- uses: actions/cache@v2 | ||
id: cache | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Build | ||
run: | | ||
export PATH=$PATH:$(go env GOPATH)/bin | ||
make drand | ||
make drand-client | ||
make drand-relay-http | ||
make drand-relay-gossip | ||
make drand-relay-s3 | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: '^1.16' | ||
- uses: actions/cache@v2 | ||
id: cache | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- run: go get -v -t -d ./... | ||
- name: Unit tests | ||
run: make test-unit | ||
- run: make test-integration | ||
|
||
coverage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: '^1.16' | ||
- uses: actions/cache@v2 | ||
id: cache | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- run: go get -u github.com/ory/go-acc | ||
- run: go get -v -t -d ./... | ||
- run: go-acc ./... | ||
- run: bash <(curl -s https://codecov.io/bash) |
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
Oops, something went wrong.