Skip to content

Commit

Permalink
feat: implements auto ci
Browse files Browse the repository at this point in the history
  • Loading branch information
mohsensamiei committed May 2, 2020
1 parent e8682a4 commit cd9ee5d
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Check

on: [push, pull_request]

jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:

- name: Setup Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.13
id: go

- name: Checkout code
uses: actions/checkout@v2

- name: Get dependencies
run: go mod download

- name: Running tests
run: go test -v ./...
33 changes: 33 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Coverage

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
coverage:
name: Coverage
runs-on: ubuntu-latest
steps:

- name: Setup Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.13
id: go

- name: Checkout code
uses: actions/checkout@v2

- name: Get dependencies
run: go mod download

- name: Running tests
run: go test -cover -coverprofile=coverage.out ./...

- name: Reporting coverage
env:
CODECOV_TOKEN: d864d00b-a566-423e-bd8b-79ed7bbfe025
run: bash <(curl -s https://codecov.io/bash)

0 comments on commit cd9ee5d

Please sign in to comment.