run_test_case.yaml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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. mkdir -p data
  27. mkdir -p log
  28. go build --buildmode=plugin -o plugins/sources/Random@v2.0.0.so plugins/sources/random.go
  29. go build --buildmode=plugin -o plugins/sinks/File@v1.0.0.so plugins/sinks/file.go
  30. go build --buildmode=plugin -o plugins/functions/Echo.so plugins/functions/echo.go
  31. go build --buildmode=plugin -o plugins/functions/CountPlusOne@v1.0.0.so plugins/functions/countPlusOne.go
  32. go build --buildmode=plugin -o plugins/functions/AccumulateWordCount@v1.0.0.so plugins/functions/accumulateWordCount.go
  33. go test ./...
  34. go test --tags=edgex ./...