Skip to content

Commit 858d64a

Browse files
author
Matthias Nguyen
authored
Feature/ci scan rework (#141)
* ci: replaced sonarcloud with codecov * docs: added codecov badge to readme * refactor: adjusted file permissions and added nolint
1 parent 823b482 commit 858d64a

File tree

5 files changed

+211
-18
lines changed

5 files changed

+211
-18
lines changed

.github/workflows/build-publish.yml

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
paths-ignore:
99
- '**/*.md'
1010
- '**/*.txt'
11+
- 'examples/'
1112
pull_request:
1213
paths-ignore:
1314
- '**/*.md'
@@ -16,25 +17,25 @@ on:
1617
jobs:
1718
lint:
1819
name: Lint
19-
runs-on: ubuntu-20.04
20+
runs-on: ubuntu-latest
2021
steps:
2122
- name: Check out code
2223
uses: actions/checkout@v2
2324

24-
- name: Install golangci-lint
25-
run: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.24.0
26-
27-
- name: Run golangci-lint
28-
run: $(go env GOPATH)/bin/golangci-lint run -c .golangci.yml --timeout=5m
25+
- name: golangci-lint
26+
uses: golangci/golangci-lint-action@v2
27+
with:
28+
version: v1.29
29+
args: --config=".golangci.yml" --timeout=5m
2930

3031
test:
3132
name: Test & Scan
32-
runs-on: ubuntu-20.04
33+
runs-on: ubuntu-latest
3334
steps:
3435
- name: Set up Go
3536
uses: actions/setup-go@v2
3637
with:
37-
go-version: 1.14
38+
go-version: 1.16.3
3839

3940
- name: Check out code
4041
uses: actions/checkout@v2
@@ -45,22 +46,25 @@ jobs:
4546
- name: Run Unit tests.
4647
run: make test-coverage
4748

48-
- name: SonarCloud Scan
49-
uses: sonarsource/sonarcloud-github-action@master
50-
env:
51-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
49+
- name: CodeCov Scan
50+
uses: codecov/codecov-action@v1
51+
with:
52+
files: ./cover.out
53+
flags: unittests
54+
name: codecov-umbrella
55+
fail_ci_if_error: true
56+
verbose: false
5357

5458
build:
5559
name: Build
5660
if: ${{ !github.base_ref }}
57-
runs-on: ubuntu-20.04
61+
runs-on: ubuntu-latest
5862
needs: [lint, test]
5963
steps:
6064
- name: Set up Go
6165
uses: actions/setup-go@v2
6266
with:
63-
go-version: 1.14
67+
go-version: 1.16.3
6468

6569
- name: Check out code
6670
uses: actions/checkout@v2
@@ -71,7 +75,7 @@ jobs:
7175
publish:
7276
name: Publish
7377
if: ${{ !github.base_ref }} # Do not execute on PRs
74-
runs-on: ubuntu-20.04
78+
runs-on: ubuntu-latest
7579
needs: [lint, test, build]
7680
steps:
7781
- name: Check out code

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Kelon is a policy enforcement point, that is wrapping the [Open Policy Agent](https://www.openpolicyagent.org) (OPA) and adding more functionality in terms of microservices.
44

55
### Status
6-
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Foundato_kelon&metric=alert_status)](https://sonarcloud.io/dashboard?id=Foundato_kelon)
6+
[![codecov](https://codecov.io/gh/Foundato/kelon/branch/master/graph/badge.svg)](https://codecov.io/gh//Foundato/kelon)
77
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FFoundato%2Fkelon.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2FFoundato%2Fkelon?ref=badge_shield)
88

99
## Problems you face when applying authorizing to your services

0 commit comments

Comments
 (0)