test.yml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. name: Build and test
  2. on:
  3. push:
  4. branches:
  5. - master
  6. pull_request:
  7. paths:
  8. - '.github/workflows/test.yml'
  9. - '**Makefile'
  10. - '**.go'
  11. - '**.proto'
  12. - 'go.mod'
  13. - 'go.sum'
  14. jobs:
  15. test-linux:
  16. name: Build all and test on ubuntu-linux
  17. runs-on: ubuntu-latest
  18. steps:
  19. - uses: actions/checkout@v4
  20. - uses: actions/setup-go@v5
  21. with:
  22. go-version-file: 'go.mod'
  23. check-latest: true
  24. - name: Build
  25. run: make all
  26. - name: Vet
  27. run: make vet
  28. - name: Test
  29. run: make test
  30. - name: End 2 end
  31. run: make e2evv
  32. - uses: actions/upload-artifact@v3
  33. with:
  34. name: e2e packet flow
  35. path: e2e/mermaid/
  36. if-no-files-found: warn
  37. test-linux-boringcrypto:
  38. name: Build and test on linux with boringcrypto
  39. runs-on: ubuntu-latest
  40. steps:
  41. - uses: actions/checkout@v4
  42. - uses: actions/setup-go@v5
  43. with:
  44. go-version-file: 'go.mod'
  45. check-latest: true
  46. - name: Build
  47. run: make bin-boringcrypto
  48. - name: Test
  49. run: make test-boringcrypto
  50. - name: End 2 end
  51. run: make e2evv GOEXPERIMENT=boringcrypto CGO_ENABLED=1
  52. test:
  53. name: Build and test on ${{ matrix.os }}
  54. runs-on: ${{ matrix.os }}
  55. strategy:
  56. matrix:
  57. os: [windows-latest, macos-11]
  58. steps:
  59. - uses: actions/checkout@v4
  60. - uses: actions/setup-go@v5
  61. with:
  62. go-version-file: 'go.mod'
  63. check-latest: true
  64. - name: Build nebula
  65. run: go build ./cmd/nebula
  66. - name: Build nebula-cert
  67. run: go build ./cmd/nebula-cert
  68. - name: Vet
  69. run: make vet
  70. - name: Test
  71. run: make test
  72. - name: End 2 end
  73. run: make e2evv
  74. - uses: actions/upload-artifact@v3
  75. with:
  76. name: e2e packet flow
  77. path: e2e/mermaid/
  78. if-no-files-found: warn