-
Notifications
You must be signed in to change notification settings - Fork 414
79 lines (73 loc) · 2.73 KB
/
run_test_case.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Run test cases
concurrency:
group: test-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
tags:
- "*"
branches:
- master
pull_request:
paths-ignore:
- "docs/**"
release:
types:
- published
jobs:
run_unit_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.22'
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
env:
DEBIAN_FRONTEND: noninteractive
run: |
pip3 install pynng==0.7.2 && sudo apt-get update && sudo apt-get install ffmpeg libzmq3-dev -y
- name: Build plugins
run: |
set -e -u -x
mkdir -p data
mkdir -p log
mkdir -p plugins/sinks plugins/sources plugins/functions
sed -i -r "s/debug: .*/debug: true/1" etc/kuiper.yaml
go build --buildmode=plugin -trimpath --cover -covermode=atomic -coverpkg=./... -o plugins/sources/[email protected] extensions/sources/random/random.go
cp extensions/sources/random/random.yaml etc/sources/random.yaml
go build --buildmode=plugin -trimpath --cover -covermode=atomic -coverpkg=./... -o plugins/functions/Echo.so extensions/functions/echo/echo.go
go build --buildmode=plugin -trimpath --cover -covermode=atomic -coverpkg=./... -o plugins/functions/[email protected] extensions/functions/countPlusOne/countPlusOne.go
go build --buildmode=plugin -trimpath --cover -covermode=atomic -coverpkg=./... -o plugins/functions/[email protected] extensions/functions/accumulateWordCount/accumulateWordCount.go
mkdir -p plugins/portable/mirror
cd sdk/go/example/mirror
go build -o ../../../../plugins/portable/mirror/mirror .
cp mirror.json ../../../../plugins/portable/mirror
cd ../../../../
cp -r sdk/python/example/pysam plugins/portable/pysam
cp -r sdk/python/ekuiper plugins/portable/pysam/
cp test/lookup.json data/lookup.json
- name: Run test case
run: |
make failpoint-enable
go test -trimpath -tags="edgex msgpack script test" --cover -covermode=atomic -coverpkg=./... -coverprofile=coverage.xml ./...
make failpoint-disable
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
verbose: true
- uses: actions/upload-artifact@v3
if: failure()
with:
name: stream.log
path: log/stream.log
run_fvt_tests:
needs:
- run_unit_tests
uses: ./.github/workflows/run_fvt_tests.yaml