test.yml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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@v4
  35. with:
  36. name: e2e packet flow linux-latest
  37. path: e2e/mermaid/linux-latest
  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-linux-pkcs11:
  55. name: Build and test on linux with pkcs11
  56. runs-on: ubuntu-latest
  57. steps:
  58. - uses: actions/checkout@v4
  59. - uses: actions/setup-go@v5
  60. with:
  61. go-version: '1.22'
  62. check-latest: true
  63. - name: Build
  64. run: make bin-pkcs11
  65. - name: Test
  66. run: make test-pkcs11
  67. test:
  68. name: Build and test on ${{ matrix.os }}
  69. runs-on: ${{ matrix.os }}
  70. strategy:
  71. matrix:
  72. os: [windows-latest, macos-latest]
  73. steps:
  74. - uses: actions/checkout@v4
  75. - uses: actions/setup-go@v5
  76. with:
  77. go-version: '1.22'
  78. check-latest: true
  79. - name: Build nebula
  80. run: go build ./cmd/nebula
  81. - name: Build nebula-cert
  82. run: go build ./cmd/nebula-cert
  83. - name: Vet
  84. run: make vet
  85. - name: Test
  86. run: make test
  87. - name: End 2 end
  88. run: make e2evv
  89. - uses: actions/upload-artifact@v4
  90. with:
  91. name: e2e packet flow ${{ matrix.os }}
  92. path: e2e/mermaid/${{ matrix.os }}
  93. if-no-files-found: warn