-
Notifications
You must be signed in to change notification settings - Fork 14
57 lines (54 loc) · 1.5 KB
/
unit.yaml
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
55
56
57
name: Unittest
on:
push:
paths:
- 'core/**'
- 'server/**'
- 'tests/**'
# Triggers the workflow on push or pull request events but only for the master branch
pull_request:
paths:
- 'core/**'
- 'server/**'
- 'tests/**'
jobs:
# This workflow contains a single job called "build"
build:
name: Unittest AMD64 Ubuntu ${{ matrix.ubuntu }}
# The type of runner that the job will run on
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
ubuntu: [18.04]
env:
UBUNTU: ${{ matrix.ubuntu }}
services:
mysql:
image: mysql:5.7.42
env:
MYSQL_ROOT_PASSWORD: 123456
MYSQL_DATABASE: milvuscdc
ports:
- 3306:3306
etcd:
image: quay.io/coreos/etcd:v3.5.5
env:
ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
ETCD_LISTEN_CLIENT_URLS: http://0.0.0.0:2379
ports:
- 2379:2379
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
# Runs a single command using the runners shell
- name: Run Unittest
run: make test-go
- name: Upload coverage to Codecov
if: github.repository == 'zilliztech/milvus-cdc'
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.project.out
name: ubuntu-${{ matrix.ubuntu }}-unittests