windows-ci.yml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. name: Windows CI
  2. on:
  3. push:
  4. branches:
  5. - main
  6. pull_request:
  7. jobs:
  8. check-optional-tests:
  9. name: Check if needs to run Windows build and tests
  10. runs-on: ubuntu-latest
  11. outputs:
  12. trigger-windows: ${{steps.runwindowstest.outputs.triggered}}
  13. steps:
  14. - uses: khan/pull-request-comment-trigger@master
  15. name: Check if test Windows
  16. if: github.event_name == 'pull_request'
  17. id: runwindowstest
  18. with:
  19. trigger: '/test-windows'
  20. windows-build:
  21. name: Windows Build
  22. runs-on: windows-latest
  23. env:
  24. GO111MODULE: "on"
  25. needs: check-optional-tests
  26. if: github.ref == 'refs/heads/main' || needs.check-optional-tests.outputs.trigger-windows == 'true'
  27. steps:
  28. - name: Set up Go 1.16
  29. uses: actions/setup-go@v2
  30. with:
  31. go-version: 1.16
  32. id: go
  33. - name: Setup docker CLI
  34. run: |
  35. docker version
  36. - name: Checkout code into the Go module directory
  37. uses: actions/checkout@v2
  38. - uses: actions/cache@v2
  39. with:
  40. path: ~/go/pkg/mod
  41. key: go-${{ hashFiles('**/go.sum') }}
  42. - name: Test
  43. run: make -f builder.Makefile test
  44. - name: Build
  45. env:
  46. BUILD_TAGS: e2e
  47. run: make -f builder.Makefile cli
  48. - name: E2E Test
  49. run: make e2e-win-ci
  50. - name: ACI e2e Test
  51. env:
  52. AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
  53. AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
  54. AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
  55. # need to docker logout on windows nodes, it seems GHActions does a `docker login --user githubactions` specifically on windows nodes
  56. run: |
  57. docker logout
  58. make e2e-aci