Skip to content

Commit

Permalink
added github CI flow
Browse files Browse the repository at this point in the history
  • Loading branch information
kaanaktas committed Sep 20, 2022
1 parent 0bf011f commit b00a42d
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/flow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: go-slm

on: [ push, pull_request ]

jobs:
test:
strategy:
matrix:
go-version: [1.18.x]
os: [ ubuntu-latest ] #[ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Check cache
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Test
run: go test -v ./...
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
- uses: actions/setup-go@v2
with:
go-version: '1.18'
- name: Run coverage
run: go test -v ./... -coverprofile=coverage.out -covermode=atomic
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

![go-slm](https://github.com/kaanaktas/go-slm/workflows/go-slm/badge.svg)
[![codecov](https://codecov.io/gh/kaanaktas/go-slm/branch/main/graph/badge.svg)](https://codecov.io/gh/kaanaktas/go-slm)

# go-slm

go-slm is a policy-based service level management library that enforces policy requirements as per service. Different policy rules can be combined
Expand Down
7 changes: 7 additions & 0 deletions main_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package main

import "testing"

func Test(t *testing.T) {
main()
}

0 comments on commit b00a42d

Please sign in to comment.