-
-
Notifications
You must be signed in to change notification settings - Fork 32
50 lines (49 loc) · 1.41 KB
/
main.yml
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
45
46
47
48
49
50
name: build
on:
push:
branches:
- develop
- master
pull_request:
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.13
- name: Check out code
uses: actions/checkout@v1
- name: Run Unit tests.
run: make test
env:
UPLOADER_COS_AK: ${{ secrets.UPLOADER_COS_AK }}
UPLOADER_COS_SK: ${{ secrets.UPLOADER_COS_SK }}
UPLOADER_OSS_AK: ${{ secrets.UPLOADER_OSS_AK }}
UPLOADER_OSS_SK: ${{ secrets.UPLOADER_OSS_SK }}
UPLOADER_QINIU_AK: ${{ secrets.UPLOADER_QINIU_AK }}
UPLOADER_QINIU_SK: ${{ secrets.UPLOADER_QINIU_SK }}
UPLOADER_STORAGE_AK: ${{ secrets.UPLOADER_STORAGE_AK }}
UPLOADER_STORAGE_SK: ${{ secrets.UPLOADER_STORAGE_SK }}
UPLOADER_S3_AK: ${{ secrets.UPLOADER_S3_AK }}
UPLOADER_S3_SK: ${{ secrets.UPLOADER_S3_SK }}
- name: Upload Coverage report to CodeCov
uses: codecov/codecov-action@v1.0.0
with:
token: ${{secrets.CODECOV_TOKEN}}
file: .coverprofile
build:
name: Build
runs-on: ubuntu-latest
needs: [test]
steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.13
- name: Check out code
uses: actions/checkout@v1
- name: Build
run: make build