25 lines
551 B
YAML
25 lines
551 B
YAML
name: CI
|
|
on: [push, pull_request]
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Set up Golang
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: '^1.18.0'
|
|
- run: go version
|
|
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v2
|
|
|
|
- name: install dependencies
|
|
run: go mod download
|
|
|
|
- name: run test
|
|
run: go test -race -coverprofile=coverage.txt -covermode=atomic
|
|
|
|
- name: upload coverage
|
|
run: bash <(curl -s https://codecov.io/bash)
|