mirror of https://github.com/docker/compose.git
Split optional CI workflows to allow re-running only ACI, ECS or Windows.
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
This commit is contained in:
parent
92eeb624ea
commit
fe90934ed3
|
@ -0,0 +1,53 @@
|
|||
name: ACI integration tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
check-optional-tests:
|
||||
name: Check if needs to run ACI tests
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
trigger-aci: ${{steps.runacitest.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'
|
||||
|
||||
aci-tests:
|
||||
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.15
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.15
|
||||
id: go
|
||||
|
||||
- name: Checkout code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/go/pkg/mod
|
||||
key: go-${{ hashFiles('**/go.sum') }}
|
||||
|
||||
- name: Build for ACI e2e tests
|
||||
run: make -f builder.Makefile cli
|
||||
|
||||
- name: ACI e2e Test
|
||||
env:
|
||||
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
|
||||
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
|
||||
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
|
||||
run: make e2e-aci
|
|
@ -0,0 +1,57 @@
|
|||
name: ECS integration tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
check-optional-tests:
|
||||
name: Check if needs to run ECS tests
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
trigger-ecs: ${{steps.runecstest.outputs.triggered}}
|
||||
steps:
|
||||
- uses: khan/pull-request-comment-trigger@master
|
||||
name: Check if test ECS
|
||||
if: github.event_name == 'pull_request'
|
||||
id: runecstest
|
||||
with:
|
||||
trigger: '/test-ecs'
|
||||
|
||||
|
||||
ecs-tests:
|
||||
name: ECS 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-ecs == 'true'
|
||||
steps:
|
||||
- name: Set up Go 1.15
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.15
|
||||
id: go
|
||||
|
||||
- name: Checkout code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/go/pkg/mod
|
||||
key: go-${{ hashFiles('**/go.sum') }}
|
||||
|
||||
- name: Build for ECS e2e tests
|
||||
run: make -f builder.Makefile cli
|
||||
|
||||
- name: create aws config folder
|
||||
run: mkdir -p ~/.aws
|
||||
|
||||
- name: ECS e2e Test
|
||||
env:
|
||||
AWS_DEFAULT_REGION: us-west-2
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
|
||||
run: make e2e-ecs
|
|
@ -1,147 +0,0 @@
|
|||
name: Cloud integration tests
|
||||
|
||||
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-ecs: ${{steps.runecstest.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'
|
||||
- uses: khan/pull-request-comment-trigger@master
|
||||
name: Check if test ECS
|
||||
if: github.event_name == 'pull_request'
|
||||
id: runecstest
|
||||
with:
|
||||
trigger: '/test-ecs'
|
||||
|
||||
aci-tests:
|
||||
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.15
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.15
|
||||
id: go
|
||||
|
||||
- name: Checkout code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/go/pkg/mod
|
||||
key: go-${{ hashFiles('**/go.sum') }}
|
||||
|
||||
- name: Build for ACI e2e tests
|
||||
run: make -f builder.Makefile cli
|
||||
|
||||
- name: ACI e2e Test
|
||||
env:
|
||||
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
|
||||
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
|
||||
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
|
||||
run: make e2e-aci
|
||||
|
||||
ecs-tests:
|
||||
name: ECS 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-ecs == 'true'
|
||||
steps:
|
||||
- name: Set up Go 1.15
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.15
|
||||
id: go
|
||||
|
||||
- name: Checkout code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/go/pkg/mod
|
||||
key: go-${{ hashFiles('**/go.sum') }}
|
||||
|
||||
- name: Build for ECS e2e tests
|
||||
run: make -f builder.Makefile cli
|
||||
|
||||
- name: create aws config folder
|
||||
run: mkdir -p ~/.aws
|
||||
|
||||
- name: ECS e2e Test
|
||||
env:
|
||||
AWS_DEFAULT_REGION: us-west-2
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
|
||||
run: make e2e-ecs
|
||||
|
||||
windows-build:
|
||||
name: Windows Build
|
||||
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.15
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.15
|
||||
id: go
|
||||
|
||||
- name: Checkout code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/go/pkg/mod
|
||||
key: go-${{ hashFiles('**/go.sum') }}
|
||||
|
||||
- name: Test
|
||||
env:
|
||||
BUILD_TAGS: example,local
|
||||
run: make -f builder.Makefile test
|
||||
|
||||
- name: Build
|
||||
env:
|
||||
BUILD_TAGS: example,local,e2e
|
||||
run: make -f builder.Makefile cli
|
||||
|
||||
- name: E2E Test
|
||||
run: make e2e-win-ci
|
||||
|
||||
- name: ACI e2e Test
|
||||
env:
|
||||
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
|
||||
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
|
||||
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
|
||||
# need to docker logout on windows nodes, it seems GHActions does a `docker login --user githubactions` specifically on windows nodes
|
||||
run: |
|
||||
docker logout
|
||||
make e2e-aci
|
|
@ -0,0 +1,67 @@
|
|||
name: Windows CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
check-optional-tests:
|
||||
name: Check if needs to run Windows build and tests
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
trigger-windows: ${{steps.runwindowstest.outputs.triggered}}
|
||||
steps:
|
||||
- uses: khan/pull-request-comment-trigger@master
|
||||
name: Check if test Windows
|
||||
if: github.event_name == 'pull_request'
|
||||
id: runwindowstest
|
||||
with:
|
||||
trigger: '/test-windows'
|
||||
|
||||
|
||||
windows-build:
|
||||
name: Windows Build
|
||||
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.15
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.15
|
||||
id: go
|
||||
|
||||
- name: Checkout code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/go/pkg/mod
|
||||
key: go-${{ hashFiles('**/go.sum') }}
|
||||
|
||||
- name: Test
|
||||
env:
|
||||
BUILD_TAGS: example,local
|
||||
run: make -f builder.Makefile test
|
||||
|
||||
- name: Build
|
||||
env:
|
||||
BUILD_TAGS: example,local,e2e
|
||||
run: make -f builder.Makefile cli
|
||||
|
||||
- name: E2E Test
|
||||
run: make e2e-win-ci
|
||||
|
||||
- name: ACI e2e Test
|
||||
env:
|
||||
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
|
||||
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
|
||||
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
|
||||
# need to docker logout on windows nodes, it seems GHActions does a `docker login --user githubactions` specifically on windows nodes
|
||||
run: |
|
||||
docker logout
|
||||
make e2e-aci
|
|
@ -1,7 +1,7 @@
|
|||
# Docker Compose CLI
|
||||
|
||||
[](https://github.com/docker/compose-cli/actions)
|
||||
[](https://github.com/docker/compose-cli/actions)
|
||||
[](https://github.com/docker/compose-cli/actions)
|
||||
|
||||
This CLI tool makes it easy to run Docker containers and Docker Compose applications in the cloud using either Amazon
|
||||
Elastic Container Service
|
||||
|
|
Loading…
Reference in New Issue