test.yml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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: '1.22'
  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. - name: Build test mobile
  33. run: make build-test-mobile
  34. - uses: actions/upload-artifact@v3
  35. with:
  36. name: e2e packet flow
  37. path: e2e/mermaid/
  38. if-no-files-found: warn
  39. test-linux-boringcrypto:
  40. name: Build and test on linux with boringcrypto
  41. runs-on: ubuntu-latest
  42. steps:
  43. - uses: actions/checkout@v4
  44. - uses: actions/setup-go@v5
  45. with:
  46. go-version: '1.22'
  47. check-latest: true
  48. - name: Build
  49. run: make bin-boringcrypto
  50. - name: Test
  51. run: make test-boringcrypto
  52. - name: End 2 end
  53. run: make e2evv GOEXPERIMENT=boringcrypto CGO_ENABLED=1
  54. test:
  55. name: Build and test on ${{ matrix.os }}
  56. runs-on: ${{ matrix.os }}
  57. strategy:
  58. matrix:
  59. os: [windows-latest, macos-11]
  60. steps:
  61. - uses: actions/checkout@v4
  62. - uses: actions/setup-go@v5
  63. with:
  64. go-version: '1.22'
  65. check-latest: true
  66. - name: Build nebula
  67. run: go build ./cmd/nebula
  68. - name: Build nebula-cert
  69. run: go build ./cmd/nebula-cert
  70. - name: Vet
  71. run: make vet
  72. - name: Test
  73. run: make test
  74. - name: End 2 end
  75. run: make e2evv
  76. - uses: actions/upload-artifact@v3
  77. with:
  78. name: e2e packet flow
  79. path: e2e/mermaid/
  80. if-no-files-found: warn