Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Commit

Permalink
Add github actions ci yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitsakala committed Jun 3, 2020
1 parent 959f7a5 commit 90537d5
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: quarks-utils-ci

on: [push]

jobs:
linting:
runs-on: ubuntu-latest

steps:
- name: Set up Go 1.13.4
uses: actions/setup-go@v2
with:
go-version: 1.13.4
- uses: actions/checkout@v2
- uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install dependencies
run: |
go install github.com/onsi/ginkgo/ginkgo
go get -u golang.org/x/lint/golint
curl -LO https://github.com/dominikh/go-tools/releases/download/2020.1.3/staticcheck_linux_amd64.tar.gz
sudo tar xfz staticcheck_linux_amd64.tar.gz --strip-component 1 -C $GOPATH/bin staticcheck/staticcheck
- name: Run lint
run: bin/lint

unit-tests:
runs-on: ubuntu-latest

steps:
- name: Set up Go 1.13.4
uses: actions/setup-go@v2
with:
go-version: 1.13.4
- uses: actions/checkout@v2
- uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install dependencies
run: |
go install github.com/onsi/ginkgo/ginkgo
go get github.com/mattn/goveralls
go get github.com/modocache/gover
- name: Run unit tests
run: |
bin/test-unit
bin/coverage
env:
COVERAGE: true
GOPROXY: "https://proxy.golang.org"
- uses: actions/upload-artifact@master
with:
name: coverage-files
path: ./code-coverage

0 comments on commit 90537d5

Please sign in to comment.