From 0f8ea14ec38192ae434e7aa8e589c6451e6ccc69 Mon Sep 17 00:00:00 2001 From: Starchenko Ilya Date: Mon, 28 Aug 2023 02:16:31 +0600 Subject: [PATCH] Setup gh actions, move to coveralls --- .github/workflows/go.yml | 20 ++++++++++++-------- README.md | 6 +++--- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index b189869..a3d1a91 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -1,17 +1,17 @@ # This workflow will build a golang project # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go -name: Go +name: Build on: push: - branches: [ "master" ] + branches: [ "setup-gh-actions" ] pull_request: - branches: [ "master" ] + branches: [ "setup-gh-actions" ] jobs: - build: + Build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -25,7 +25,11 @@ jobs: run: go build -v ./... - name: Test - run: go test -v ./... - - - name: Update coverage report - uses: ncruces/go-coverage-report@v0 + run: go test -v --covermode atomic -coverprofile=covprofile ./... + + - name: Coverage + run: | + go install github.com/mattn/goveralls@latest + goveralls -coverprofile=covprofile -service=github + env: + COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index 8998716..6a3533a 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ # goidc - authentication with OpenID Connect [![Build Status](https://github.com/stillya/goidc/actions/workflows/go.yml/badge.svg)](https://github.com/stillya/goidc/actions/workflows/go.yml) -[![Coverage](https://github.com/stillya/goidc/wiki/coverage.svg)](https://raw.githack.com/wiki/stillya/goidc/coverage.html) +[![Coverage](https://coveralls.io/repos/github/stillya/goidc/badge.svg?branch=master)](https://coveralls.io/github/stillya/goidc?branch=setup-gh-actions) This package provides a simple way to authenticate users with OpenID Connect and help you to create an authentication service. ### NOTE: This package is still in development and not ready for production use. -* Support for different OpenID Connect providers(currently tested with Keycloak and Google, but should work with any other providers) -* Support for different authentication flows (currently tested with Authorization Code Flow, but others in progress) +* Support for different OpenID Connect providers(currently tested with Keycloak and Google, but should work with any other providers). +* Support for different authentication flows (currently tested with Authorization Code Flow, but others in progress). * JWKS and PEM key support. * Custom storage for users. Default is PostgreSQL, but you can implement your own storage.