Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit 37a547d

Browse files
authored
Merge pull request #458 from docker/optional_ci_tests
CI : Optional tests for ACI / Windows
2 parents 80c1b22 + d06d5ae commit 37a547d

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
**What I did**
22

33
**Related issue**
4-
<-- If this is a bug fix, make sure your description includes "fixes #xxxx", or "closes #xxxx" -->
4+
<!-- If this is a bug fix, make sure your description includes "fixes #xxxx", or "closes #xxxx" -->
5+
6+
<!-- optional tests
7+
You can add a @ mention to run tests executed by default only on main branch :
8+
* `test-aci` to run ACI E2E tests
9+
* `test-windows` to run tests & E2E tests on windows
10+
-->
511

612
**(not mandatory) A picture of a cute animal, if possible in relation with what you did**

.github/workflows/main-ci.yml renamed to .github/workflows/optional-ci.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,36 @@ on:
44
push:
55
branches:
66
- main
7+
pull_request:
78

89
jobs:
10+
check-optional-tests:
11+
name: Check if needs to run ACI or Windows tests
12+
runs-on: ubuntu-latest
13+
outputs:
14+
trigger-aci: ${{steps.runacitest.outputs.triggered}}
15+
trigger-windows: ${{steps.runwindowstest.outputs.triggered}}
16+
steps:
17+
- uses: khan/pull-request-comment-trigger@master
18+
name: Check if test ACI
19+
if: github.event_name == 'pull_request'
20+
id: runacitest
21+
with:
22+
trigger: '@test-aci'
23+
- uses: khan/pull-request-comment-trigger@master
24+
name: Check if test Windows
25+
if: github.event_name == 'pull_request'
26+
id: runwindowstest
27+
with:
28+
trigger: '@test-windows'
29+
930
build:
1031
name: ACI e2e tests
1132
runs-on: ubuntu-latest
1233
env:
1334
GO111MODULE: "on"
35+
needs: check-optional-tests
36+
if: github.ref == 'refs/heads/main' || needs.check-optional-tests.outputs.trigger-aci == 'true'
1437
steps:
1538
- name: Set up Go 1.14
1639
uses: actions/setup-go@v1
@@ -41,6 +64,8 @@ jobs:
4164
runs-on: windows-latest
4265
env:
4366
GO111MODULE: "on"
67+
needs: check-optional-tests
68+
if: github.ref == 'refs/heads/main' || needs.check-optional-tests.outputs.trigger-windows == 'true'
4469
steps:
4570
- name: Set up Go 1.14
4671
uses: actions/setup-go@v1

0 commit comments

Comments
 (0)