From 9b04944a71b8a97984bc2c2aae282ad41512fd97 Mon Sep 17 00:00:00 2001 From: Paul Lange Date: Wed, 18 Oct 2023 12:04:43 +0200 Subject: [PATCH] Basic GH Action config --- .github/workflows/ci.yaml | 40 +++++++++++++++++++++++++++++++++++++++ Makefile | 5 +---- 2 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 00000000..cbde58da --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,40 @@ +name: Celo Rosetta CI + +on: + push: + branches: + - master + + pull_request: + branches: + - master + +jobs: + CI: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v4 + with: + go-version: '1.17' + + - name: Install dependencies + run: make deps + + - name: Check licenses + run: make check-license + + - name: Linting + uses: golangci/golangci-lint-action@v3 + with: + version: v1.50 + + - name: Build + run: make all + + - name: Test + run: make test-cover + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + \ No newline at end of file diff --git a/Makefile b/Makefile index bc35bd06..d56c2360 100644 --- a/Makefile +++ b/Makefile @@ -24,14 +24,12 @@ all: deps: go get ./... go install github.com/google/addlicense@v1.1.1 - # used in CI - go install github.com/jstemmer/go-junit-report@v1.0.0 test: go test ./... test-cover: - go test ./... -covermode=count + go test ./... -covermode=count -coverprofile=coverage.out fmt: go fmt ./... @@ -55,7 +53,6 @@ clean: add-license: ${LICENCE_SCRIPT} analyzer airgap cmd db examples internal service main.go - check-license: ${LICENCE_SCRIPT} -check analyzer airgap cmd db examples internal service main.go