forked from crawlab-team/crawlab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.yml
54 lines (46 loc) · 1.9 KB
/
test.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
51
52
53
54
name: Test and coverage
on: [ push, pull_request ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Go environment
uses: actions/[email protected]
with:
# The Go version to download (if necessary) and use. Supports semver spec and ranges.
go-version: 1.15
# - name: Download Binary Files
# run: |
# mkdir -p $GITHUB_WORKSPACE/seaweedfs
# curl https://github.com/chrislusf/seaweedfs/releases/download/2.48/linux_amd64.tar.gz -o $GITHUB_WORKSPACE/seaweedfs/linux_amd64.tar.gz
# cd $GITHUB_WORKSPACE/seaweedfs
# ls -l
# tar -zxf linux_amd64.tar.gz
- name: Download Binary Files
uses: fabriciobastian/[email protected]
with:
# A specific release version. Defaults to latest
version: 2.48 # default is latest
# Relative path to the repository in the format user/repo e.g.: myuser/my-repository
repository: chrislusf/seaweedfs # default is
# The name of the asset to download from the release
file: linux_amd64.tar.gz
# Path to the directory where to download the asset
out: seaweedfs # optional, default is .
- name: Extract Binary Files
run: |
cd $GITHUB_WORKSPACE/seaweedfs
tar -zxf linux_amd64.tar.gz
- name: Validate Binary Files
run: |
cd $GITHUB_WORKSPACE/seaweedfs
ls -l weed
- name: Run Tests
run: go test ./... -race -coverprofile=coverage.txt -covermode=atomic -coverpkg github.com/crawlab-team/crawlab/fs
- name: Codecov
uses: codecov/[email protected]
with:
# Repository upload token - get it from codecov.io. Required only for private repositories
token: ${{ secrets.CODECOV_TOKEN }}
# Comma-separated list of files to upload