You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
2.0 KiB

  1. name: Build
  2. # Tests runs different tests (test_abci_apps, test_abci_cli, test_apps)
  3. # This workflow runs on every push to master or release branch and every pull requests
  4. # All jobs will pass without running if no *{.go, .mod, .sum} files have been modified
  5. on:
  6. pull_request:
  7. push:
  8. branches:
  9. - master
  10. - release/**
  11. jobs:
  12. build:
  13. name: Build
  14. runs-on: ubuntu-latest
  15. strategy:
  16. fail-fast: false
  17. matrix:
  18. goarch: ["arm", "amd64"]
  19. goos: ["linux"]
  20. timeout-minutes: 5
  21. steps:
  22. - uses: actions/setup-go@v2
  23. with:
  24. go-version: "1.17"
  25. - uses: actions/checkout@v2.4.0
  26. - uses: technote-space/get-diff-action@v6.0.1
  27. with:
  28. PATTERNS: |
  29. **/**.go
  30. "!test/"
  31. go.mod
  32. go.sum
  33. Makefile
  34. - name: install
  35. run: GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} make build
  36. if: "env.GIT_DIFF != ''"
  37. test_abci_cli:
  38. runs-on: ubuntu-latest
  39. needs: build
  40. timeout-minutes: 5
  41. steps:
  42. - uses: actions/setup-go@v2
  43. with:
  44. go-version: "1.17"
  45. - uses: actions/checkout@v2.4.0
  46. - uses: technote-space/get-diff-action@v6.0.1
  47. with:
  48. PATTERNS: |
  49. **/**.go
  50. go.mod
  51. go.sum
  52. - name: install
  53. run: make install_abci
  54. if: "env.GIT_DIFF != ''"
  55. - run: abci/tests/test_cli/test.sh
  56. shell: bash
  57. if: "env.GIT_DIFF != ''"
  58. test_apps:
  59. runs-on: ubuntu-latest
  60. needs: build
  61. timeout-minutes: 5
  62. steps:
  63. - uses: actions/setup-go@v2
  64. with:
  65. go-version: "1.17"
  66. - uses: actions/checkout@v2.4.0
  67. - uses: technote-space/get-diff-action@v6.0.1
  68. with:
  69. PATTERNS: |
  70. **/**.go
  71. go.mod
  72. go.sum
  73. - name: install
  74. run: make install install_abci
  75. if: "env.GIT_DIFF != ''"
  76. - name: test_apps
  77. run: test/app/test.sh
  78. shell: bash
  79. if: "env.GIT_DIFF != ''"