run_test_case.yaml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. name: Run test cases
  2. on:
  3. push:
  4. pull_request:
  5. release:
  6. types:
  7. - published
  8. jobs:
  9. run_test_case:
  10. runs-on: ubuntu-latest
  11. container:
  12. image: golang:1.14
  13. steps:
  14. - uses: actions/checkout@v2
  15. - name: run code static check
  16. run : |
  17. if [ ! -z "$(gofmt -l .)" ];then
  18. echo "code static check error"
  19. gofmt -l .
  20. exit 1
  21. fi
  22. - name: install lib
  23. run: apt-get update && apt-get install libzmq3-dev -y
  24. - name: run test case
  25. run: |
  26. set -e -u -x
  27. mkdir -p data
  28. mkdir -p log
  29. sed -i -r "s/debug: .*/debug: true/1" etc/kuiper.yaml
  30. go build --buildmode=plugin -o plugins/sources/Random@v2.0.0.so plugins/sources/random.go
  31. go build --buildmode=plugin -o plugins/sinks/File@v1.0.0.so plugins/sinks/file.go
  32. go build --buildmode=plugin -o plugins/functions/Echo.so plugins/functions/echo.go
  33. go build --buildmode=plugin -o plugins/functions/CountPlusOne@v1.0.0.so plugins/functions/countPlusOne.go
  34. go build --buildmode=plugin -o plugins/functions/AccumulateWordCount@v1.0.0.so plugins/functions/accumulateWordCount.go
  35. go test --tags=edgex ./...
  36. - uses: actions/upload-artifact@v1
  37. if: failure()
  38. with:
  39. name: stream.log
  40. path: log/stream.log