|
@@ -8,6 +8,8 @@ on:
|
|
|
push:
|
|
|
tags:
|
|
|
- "*"
|
|
|
+ branches:
|
|
|
+ - master
|
|
|
pull_request:
|
|
|
release:
|
|
|
types:
|
|
@@ -19,7 +21,7 @@ jobs:
|
|
|
|
|
|
steps:
|
|
|
- uses: actions/checkout@v3
|
|
|
- - uses: actions/setup-go@v3
|
|
|
+ - uses: actions/setup-go@v4
|
|
|
with:
|
|
|
go-version: '1.20'
|
|
|
- uses: actions/setup-python@v4
|
|
@@ -27,13 +29,6 @@ jobs:
|
|
|
python-version: '3.x'
|
|
|
architecture: 'x64'
|
|
|
- run: pip3 install pynng
|
|
|
- - name: run code static check
|
|
|
- run : |
|
|
|
- if [ ! -z "$(gofmt -l .)" ];then
|
|
|
- echo "code static check error"
|
|
|
- gofmt -l .
|
|
|
- exit 1
|
|
|
- fi
|
|
|
- name: install lib
|
|
|
env:
|
|
|
DEBIAN_FRONTEND: noninteractive
|
|
@@ -68,6 +63,12 @@ jobs:
|
|
|
cp -r sdk/python/example/pysam plugins/portable/pysam
|
|
|
cp -r sdk/python/ekuiper plugins/portable/pysam/
|
|
|
go test --tags="edgex script test" --cover -covermode=atomic -coverpkg=./... -coverprofile=coverage.out $(go list ./... | grep -v "github.com/lf-edge/ekuiper/internal/topo/topotest/plugin")
|
|
|
+ - name: Upload coverage to Codecov
|
|
|
+ uses: codecov/codecov-action@v3
|
|
|
+ with:
|
|
|
+ files: coverage.out
|
|
|
+ fail_ci_if_error: true
|
|
|
+ verbose: true
|
|
|
- name: run plugins test case
|
|
|
run: |
|
|
|
mkdir -p data/test/uploads
|
|
@@ -81,32 +82,4 @@ jobs:
|
|
|
if: failure()
|
|
|
with:
|
|
|
name: stream.log
|
|
|
- path: log/stream.log
|
|
|
- - uses: actions/upload-artifact@v3
|
|
|
- with:
|
|
|
- name: coverprofile
|
|
|
- path: |
|
|
|
- *.out
|
|
|
-
|
|
|
- codecov:
|
|
|
- runs-on: ubuntu-latest
|
|
|
- needs:
|
|
|
- - run_test_case
|
|
|
- steps:
|
|
|
- - uses: actions/download-artifact@v3
|
|
|
- with:
|
|
|
- name: coverprofile
|
|
|
- - name: Get cover files
|
|
|
- id: files
|
|
|
- run: |
|
|
|
- files="$(find -maxdepth 1 -name '*.out' -exec readlink -f '{}' ';' | tr '\n' ',' | sed 's/,$//g')"
|
|
|
- echo "files=$files" >> $GITHUB_OUTPUT
|
|
|
- - uses: codecov/codecov-action@v3
|
|
|
- with:
|
|
|
- token: ${{ secrets.CODECOV_TOKEN }}
|
|
|
- files: ${{ steps.files.outputs.files }} # optional
|
|
|
- fail_ci_if_error: true # optional (default = false)
|
|
|
- verbose: true # optional (default = false)
|
|
|
- - uses: geekyeggo/delete-artifact@v2
|
|
|
- with:
|
|
|
- name: coverprofile
|
|
|
+ path: log/stream.log
|