test.yml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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.24'
  23. check-latest: true
  24. - name: Build
  25. run: make all
  26. - name: Vet
  27. run: make vet
  28. - name: golangci-lint
  29. uses: golangci/golangci-lint-action@v7
  30. with:
  31. version: v2.0
  32. - name: Test
  33. run: make test
  34. - name: End 2 end
  35. run: make e2evv
  36. - name: Build test mobile
  37. run: make build-test-mobile
  38. - uses: actions/upload-artifact@v4
  39. with:
  40. name: e2e packet flow linux-latest
  41. path: e2e/mermaid/linux-latest
  42. if-no-files-found: warn
  43. test-linux-boringcrypto:
  44. name: Build and test on linux with boringcrypto
  45. runs-on: ubuntu-latest
  46. steps:
  47. - uses: actions/checkout@v4
  48. - uses: actions/setup-go@v5
  49. with:
  50. go-version: '1.24'
  51. check-latest: true
  52. - name: Build
  53. run: make bin-boringcrypto
  54. - name: Test
  55. run: make test-boringcrypto
  56. - name: End 2 end
  57. run: make e2e GOEXPERIMENT=boringcrypto CGO_ENABLED=1 TEST_ENV="TEST_LOGS=1" TEST_FLAGS="-v -ldflags -checklinkname=0"
  58. test-linux-pkcs11:
  59. name: Build and test on linux with pkcs11
  60. runs-on: ubuntu-latest
  61. steps:
  62. - uses: actions/checkout@v4
  63. - uses: actions/setup-go@v5
  64. with:
  65. go-version: '1.22'
  66. check-latest: true
  67. - name: Build
  68. run: make bin-pkcs11
  69. - name: Test
  70. run: make test-pkcs11
  71. test:
  72. name: Build and test on ${{ matrix.os }}
  73. runs-on: ${{ matrix.os }}
  74. strategy:
  75. matrix:
  76. os: [windows-latest, macos-latest]
  77. steps:
  78. - uses: actions/checkout@v4
  79. - uses: actions/setup-go@v5
  80. with:
  81. go-version: '1.24'
  82. check-latest: true
  83. - name: Build nebula
  84. run: go build ./cmd/nebula
  85. - name: Build nebula-cert
  86. run: go build ./cmd/nebula-cert
  87. - name: Vet
  88. run: make vet
  89. - name: golangci-lint
  90. uses: golangci/golangci-lint-action@v7
  91. with:
  92. version: v2.0
  93. - name: Test
  94. run: make test
  95. - name: End 2 end
  96. run: make e2evv
  97. - uses: actions/upload-artifact@v4
  98. with:
  99. name: e2e packet flow ${{ matrix.os }}
  100. path: e2e/mermaid/${{ matrix.os }}
  101. if-no-files-found: warn