|
|
@@ -4,13 +4,36 @@ on:
|
|
|
push:
|
|
|
branches:
|
|
|
- main
|
|
|
+ pull_request:
|
|
|
|
|
|
jobs:
|
|
|
+ check-optional-tests:
|
|
|
+ name: Check if needs to run ACI or Windows tests
|
|
|
+ runs-on: ubuntu-latest
|
|
|
+ outputs:
|
|
|
+ trigger-aci: ${{steps.runacitest.outputs.triggered}}
|
|
|
+ trigger-windows: ${{steps.runwindowstest.outputs.triggered}}
|
|
|
+ steps:
|
|
|
+ - uses: khan/pull-request-comment-trigger@master
|
|
|
+ name: Check if test ACI
|
|
|
+ if: github.event_name == 'pull_request'
|
|
|
+ id: runacitest
|
|
|
+ with:
|
|
|
+ trigger: '@test-aci'
|
|
|
+ - uses: khan/pull-request-comment-trigger@master
|
|
|
+ name: Check if test Windows
|
|
|
+ if: github.event_name == 'pull_request'
|
|
|
+ id: runwindowstest
|
|
|
+ with:
|
|
|
+ trigger: '@test-windows'
|
|
|
+
|
|
|
build:
|
|
|
name: ACI e2e tests
|
|
|
runs-on: ubuntu-latest
|
|
|
env:
|
|
|
GO111MODULE: "on"
|
|
|
+ needs: check-optional-tests
|
|
|
+ if: github.ref == 'refs/heads/main' || needs.check-optional-tests.outputs.trigger-aci == 'true'
|
|
|
steps:
|
|
|
- name: Set up Go 1.14
|
|
|
uses: actions/setup-go@v1
|
|
|
@@ -41,6 +64,8 @@ jobs:
|
|
|
runs-on: windows-latest
|
|
|
env:
|
|
|
GO111MODULE: "on"
|
|
|
+ needs: check-optional-tests
|
|
|
+ if: github.ref == 'refs/heads/main' || needs.check-optional-tests.outputs.trigger-windows == 'true'
|
|
|
steps:
|
|
|
- name: Set up Go 1.14
|
|
|
uses: actions/setup-go@v1
|