From d71dfa70684d66d7f866437bacd08f20bc9d3538 Mon Sep 17 00:00:00 2001 From: arnau <17317030+arnaucube@users.noreply.github.com> Date: Fri, 24 Jul 2020 12:39:57 +0200 Subject: [PATCH] Add GHA with Tests & Lints --- .github/workflows/lint.yml | 16 ++++++++++++++++ .github/workflows/test.yml | 22 ++++++++++++++++++++++ README.md | 3 ++- 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/lint.yml create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..e88a3f9 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,16 @@ +name: Lint +on: [ push, pull_request ] +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Install Go + uses: actions/setup-go@v1 + with: + go-version: 1.14.x + - name: Checkout code + uses: actions/checkout@v2 + - name: Lint + run: | + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.24.0 + $(go env GOPATH)/bin/golangci-lint run diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..367d88a --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,22 @@ +name: Test +on: [ push, pull_request ] +jobs: + test: + strategy: + matrix: + go-version: [ 1.13.x, 1.14.x ] + goarch: [ "amd64", "386" ] + runs-on: ubuntu-latest + steps: + - name: Install Go + uses: actions/setup-go@v1 + with: + go-version: ${{ matrix.go-version }} + env: + GOARCH: ${{ matrix.goarch }} + - name: Checkout code + uses: actions/checkout@v2 + - name: Test + env: + GOARCH: ${{ matrix.goarch }} + run: go test ./... diff --git a/README.md b/README.md index efa6859..e0017af 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ -# hermez-node +# hermez-node [![Go Report Card](https://goreportcard.com/badge/github.com/hermeznetwork/hermez-node)](https://goreportcard.com/report/github.com/hermeznetwork/hermez-node) [![Test Status](https://github.com/hermeznetwork/hermez-node/workflows/Test/badge.svg)](https://github.com/hermeznetwork/hermez-node/actions?query=workflow%3ATest) [![Lint Status](https://github.com/hermeznetwork/hermez-node/workflows/Lint/badge.svg)](https://github.com/hermeznetwork/hermez-node/actions?query=workflow%3ALint) [![GoDoc](https://godoc.org/github.com/hermeznetwork/hermez-node?status.svg)](https://godoc.org/github.com/hermeznetwork/hermez-node) + Go implementation of the Hermez node.