-
Notifications
You must be signed in to change notification settings - Fork 32
44 lines (38 loc) 路 1.13 KB
/
Copy pathci.yml
File metadata and controls
44 lines (38 loc) 路 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: CI
on: [ push, pull_request ]
jobs:
test:
strategy:
matrix:
os:
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@master
with:
fetch-depth: 0
- name: Set Up Go
uses: actions/setup-go@v2
with:
go-version: '^1'
- name: Unit Test
run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
flags: unittests
verbose: true
- name: Integration Test
run: |
go run . -d -c my_token.example.yaml
curl -sfL https://raw.githubusercontent.com/polyrabbit/my-token/master/install.sh | bash -s -- -d #Ensure download script works
- name: GoReleaser
uses: goreleaser/goreleaser-action@v2
if: startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: release --rm-dist --skip-validate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}