From 08e6450d21a14aff9181d4df6ce0b28a08236b9b Mon Sep 17 00:00:00 2001 From: jdolitsky <393494+jdolitsky@users.noreply.github.com> Date: Mon, 13 Jul 2020 14:56:10 -0500 Subject: [PATCH] update CI Signed-off-by: jdolitsky <393494+jdolitsky@users.noreply.github.com> --- .codefresh/master.yml | 8 -------- .github/workflows/build-pr.yml | 25 +++++++++++++++++++++++++ .github/workflows/build.yml | 25 +++++++++++++++++++++++++ README.md | 2 +- 4 files changed, 51 insertions(+), 9 deletions(-) delete mode 100644 .codefresh/master.yml create mode 100644 .github/workflows/build-pr.yml create mode 100644 .github/workflows/build.yml diff --git a/.codefresh/master.yml b/.codefresh/master.yml deleted file mode 100644 index 2c1ee33..0000000 --- a/.codefresh/master.yml +++ /dev/null @@ -1,8 +0,0 @@ -version: '1.0' -steps: - test: - image: golang:1.14 - commands: - - export GO111MODULE=on - - go mod download && go mod vendor - - make test diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml new file mode 100644 index 0000000..f1e886c --- /dev/null +++ b/.github/workflows/build-pr.yml @@ -0,0 +1,25 @@ +name: build-pr + +on: + pull_request: + branches: + - master + +jobs: + run: + runs-on: ubuntu-latest + steps: + - name: checkout source code + uses: actions/checkout@master + - name: setup go environment + uses: actions/setup-go@v1 + with: + go-version: '1.14.4' + - name: run tests + run: make test + - name: upload coverage report + uses: actions/upload-artifact@master + with: + name: chartmuseum-auth-coverage-report-${{ github.sha }} + path: coverage.html + if: always() diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..a41f35b --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,25 @@ +name: build + +on: + push: + branches: + - master + +jobs: + run: + runs-on: ubuntu-latest + steps: + - name: checkout source code + uses: actions/checkout@master + - name: setup go environment + uses: actions/setup-go@v1 + with: + go-version: '1.14.4' + - name: run tests + run: make test + - name: upload coverage report + uses: actions/upload-artifact@master + with: + name: chartmuseum-auth-coverage-report-${{ github.sha }} + path: coverage.html + if: always() diff --git a/README.md b/README.md index 6bf7b04..ceb399c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # chartmuseum/auth -[![Codefresh build status]( https://g.codefresh.io/api/badges/pipeline/chartmuseum/chartmuseum%2Fauth%2Fmaster?type=cf-1)]( https://g.codefresh.io/public/accounts/chartmuseum/pipelines/chartmuseum/auth/master) +[![GitHub Actions status](https://github.com/chartmuseum/auth/workflows/build/badge.svg)](https://github.com/chartmuseum/auth/actions?query=workflow%3Abuild) [![Go Report Card](https://goreportcard.com/badge/github.com/chartmuseum/auth)](https://goreportcard.com/report/github.com/chartmuseum/auth) [![GoDoc](https://godoc.org/github.com/chartmuseum/auth?status.svg)](https://godoc.org/github.com/chartmuseum/auth)