run_test_case.yaml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. name: Run test cases
  2. concurrency:
  3. group: test-${{ github.event_name }}-${{ github.ref }}
  4. cancel-in-progress: true
  5. on:
  6. push:
  7. tags:
  8. - "*"
  9. pull_request:
  10. release:
  11. types:
  12. - published
  13. jobs:
  14. run_test_case:
  15. runs-on: ubuntu-latest
  16. steps:
  17. - uses: actions/checkout@v2
  18. - uses: actions/setup-go@v2
  19. with:
  20. go-version: '1.15.1'
  21. - uses: actions/setup-python@v2
  22. with:
  23. python-version: '3.x'
  24. architecture: 'x64'
  25. - run: pip3 install pynng
  26. - name: run code static check
  27. run : |
  28. if [ ! -z "$(gofmt -l .)" ];then
  29. echo "code static check error"
  30. gofmt -l .
  31. exit 1
  32. fi
  33. - name: install lib
  34. run: sudo apt-get update && sudo apt-get install libzmq3-dev -y
  35. - name: run test case
  36. run: |
  37. set -e -u -x
  38. mkdir -p data
  39. mkdir -p log
  40. sed -i -r "s/debug: .*/debug: true/1" etc/kuiper.yaml
  41. go build -modfile extensions.mod --buildmode=plugin -o plugins/sources/Random@v2.0.0.so extensions/sources/random/random.go
  42. go build -modfile extensions.mod --buildmode=plugin -o plugins/sinks/File@v1.0.0.so extensions/sinks/file/file.go
  43. go build -modfile extensions.mod --buildmode=plugin -o plugins/functions/Echo.so extensions/functions/echo/echo.go
  44. go build -modfile extensions.mod --buildmode=plugin -o plugins/functions/CountPlusOne@v1.0.0.so extensions/functions/countPlusOne/countPlusOne.go
  45. go build -modfile extensions.mod --buildmode=plugin -o plugins/functions/AccumulateWordCount@v1.0.0.so extensions/functions/accumulateWordCount/accumulateWordCount.go
  46. mkdir -p plugins/portable/mirror
  47. cd sdk/go/example/mirror
  48. go build -o ../../../../plugins/portable/mirror/mirror .
  49. cp mirror.json ../../../../plugins/portable/mirror
  50. cd ../../../../
  51. cp -r sdk/python/example/pysam plugins/portable/pysam
  52. cp -r sdk/python/ekuiper plugins/portable/pysam/
  53. go test --tags="edgex test" ./...
  54. - uses: actions/upload-artifact@v1
  55. if: failure()
  56. with:
  57. name: stream.log
  58. path: log/stream.log