From d7a6a4b2b7a087fd8f3c0c753c2f22da700fb254 Mon Sep 17 00:00:00 2001 From: arnaucube Date: Sat, 26 Jun 2021 18:33:55 +0200 Subject: [PATCH] Add GHA --- .github/workflows/lint.yml | 16 ++++++++++++++++ .github/workflows/test.yml | 19 +++++++++++++++++++ README.md | 2 +- 3 files changed, 36 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..74abf7e --- /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.16.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.30.0 + $(go env GOPATH)/bin/golangci-lint run --timeout=5m -c .golangci.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..b921f79 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,19 @@ +name: Test +on: [push, pull_request] +jobs: + test: + # matrix strategy from: https://github.com/mvdan/github-actions-golang/blob/master/.github/workflows/test.yml + strategy: + matrix: + go-version: [1.16.x] + platform: [ubuntu-latest] + runs-on: ${{ matrix.platform }} + steps: + - name: Install Go + uses: actions/setup-go@v1 + with: + go-version: ${{ matrix.go-version }} + - name: Checkout code + uses: actions/checkout@v2 + - name: Go test + run: go test ./... diff --git a/README.md b/README.md index b7f116e..227ece3 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# kzg-commitments-study +# kzg-commitments-study [![GoDoc](https://godoc.org/github.com/arnaucube/kzg-commitments-study?status.svg)](https://godoc.org/github.com/arnaucube/kzg-commitments-study) [![Go Report Card](https://goreportcard.com/badge/github.com/arnaucube/kzg-commitments-study)](https://goreportcard.com/report/github.com/arnaucube/kzg-commitments-study) [![Test](https://github.com/arnaucube/kzg-commitments-study/workflows/Test/badge.svg)](https://github.com/arnaucube/kzg-commitments-study/actions?query=workflow%3ATest) Doing this to study and learn [KZG commitments](http://cacr.uwaterloo.ca/techreports/2010/cacr2010-10.pdf), do not use in production.