Skip to content

Commit

Permalink
[add] CI
Browse files Browse the repository at this point in the history
  • Loading branch information
showwin committed Jul 5, 2021
1 parent f8e098d commit 97e8276
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: go-ci

on: [push]

jobs:
setup:
runs-on: ubuntu-latest
steps:
- name: set up
uses: actions/setup-go@v2
with:
go-version: ^1.16
id: go
- name: check out
uses: actions/checkout@v2
- name: Cache
uses: actions/[email protected]
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
build:
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: build
run: go build ./...

test:
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: test
run: go test ./speedtest -v

lint:
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.29

0 comments on commit 97e8276

Please sign in to comment.