Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PR #490/6970aef backport][stable-2] Integrations tests : Use containers #519

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
375 changes: 318 additions & 57 deletions .github/workflows/ansible-test-plugins.yml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .github/workflows/ansible-test-roles.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Roles CI
on:
push:
Expand Down
67 changes: 67 additions & 0 deletions .github/workflows/build-docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
name: Build Docker Image for ansible-test

on:
workflow_call:
inputs:
registry:
required: true
type: string
image_name:
required: true
type: string
context:
required: true
type: string

jobs:

build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
# Requirement to use 'context' in docker/build-push-action@v3
- name: Checkout repository
uses: actions/checkout@v3

# https://github.com/docker/login-action
- name: Log into registry ${{ inputs.registry }}
uses: docker/login-action@v2
with:
registry: ${{ inputs.registry }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# https://github.com/docker/metadata-action
- name: Extract Docker metadata (tags, labels)
id: meta
uses: docker/metadata-action@v4
with:
images:
"${{ inputs.registry }}\
/${{ github.repository }}\
/${{ inputs.image_name }}"
tags: latest

# Setting up Docker Buildx with docker-container driver is required
# at the moment to be able to use a subdirectory with Git context
#
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

# https://github.com/docker/build-push-action
- name: Build and push Docker image with Buildx
id: build-and-push
uses: docker/build-push-action@v3
with:
context: ${{ inputs.context }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
19 changes: 19 additions & 0 deletions .github/workflows/docker-image-mariadb103-py38-mysqlclient201.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Docker Image CI mariadb103-py38-mysqlclient201

on:
push:
paths:
- 'test-containers/mariadb103-py38-mysqlclient201/**'
- '.github/workflows/docker-image-mariadb103-py38-mysqlclient201.yml'
- '.github/workflows/build-docker-image.yml'

jobs:

call-workflow-passing-data:
uses: ./.github/workflows/build-docker-image.yml
secrets: inherit
with:
registry: ghcr.io
image_name: test-container-mariadb103-py38-mysqlclient201
context: test-containers/mariadb103-py38-mysqlclient201
19 changes: 19 additions & 0 deletions .github/workflows/docker-image-mariadb103-py38-pymysql093.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Docker Image CI mariadb103-py38-pymysql093

on:
push:
paths:
- 'test-containers/mariadb103-py38-pymysql093/**'
- '.github/workflows/docker-image-mariadb103-py38-pymysql093.yml'
- '.github/workflows/build-docker-image.yml'

jobs:

call-workflow-passing-data:
uses: ./.github/workflows/build-docker-image.yml
secrets: inherit
with:
registry: ghcr.io
image_name: test-container-mariadb103-py38-pymysql093
context: test-containers/mariadb103-py38-pymysql093
19 changes: 19 additions & 0 deletions .github/workflows/docker-image-mariadb103-py39-mysqlclient203.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Docker Image CI mariadb103-py39-mysqlclient203

on:
push:
paths:
- 'test-containers/mariadb103-py39-mysqlclient203/**'
- '.github/workflows/docker-image-mariadb103-py39-mysqlclient203.yml'
- '.github/workflows/build-docker-image.yml'

jobs:

call-workflow-passing-data:
uses: ./.github/workflows/build-docker-image.yml
secrets: inherit
with:
registry: ghcr.io
image_name: test-container-mariadb103-py39-mysqlclient203
context: test-containers/mariadb103-py39-mysqlclient203
19 changes: 19 additions & 0 deletions .github/workflows/docker-image-mariadb103-py39-pymysql093.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Docker Image CI mariadb103-py39-pymysql093

on:
push:
paths:
- 'test-containers/mariadb103-py39-pymysql093/**'
- '.github/workflows/docker-image-mariadb103-py39-pymysql093.yml'
- '.github/workflows/build-docker-image.yml'

jobs:

call-workflow-passing-data:
uses: ./.github/workflows/build-docker-image.yml
secrets: inherit
with:
registry: ghcr.io
image_name: test-container-mariadb103-py39-pymysql093
context: test-containers/mariadb103-py39-pymysql093
19 changes: 19 additions & 0 deletions .github/workflows/docker-image-mariadb106-py310-mysqlclient211.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Docker Image CI mariadb106-py310-mysqlclient211

on:
push:
paths:
- 'test-containers/mariadb106-py310-mysqlclient211/**'
- '.github/workflows/docker-image-mariadb106-py310-mysqlclient211.yml'
- '.github/workflows/build-docker-image.yml'

jobs:

call-workflow-passing-data:
uses: ./.github/workflows/build-docker-image.yml
secrets: inherit
with:
registry: ghcr.io
image_name: test-container-mariadb106-py310-mysqlclient211
context: test-containers/mariadb106-py310-mysqlclient211
19 changes: 19 additions & 0 deletions .github/workflows/docker-image-mariadb106-py310-pymysql102.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Docker Image CI mariadb106-py310-pymysql102

on:
push:
paths:
- 'test-containers/mariadb106-py310-pymysql102/**'
- '.github/workflows/docker-image-mariadb106-py310-pymysql102.yml'
- '.github/workflows/build-docker-image.yml'

jobs:

call-workflow-passing-data:
uses: ./.github/workflows/build-docker-image.yml
secrets: inherit
with:
registry: ghcr.io
image_name: test-container-mariadb106-py310-pymysql102
context: test-containers/mariadb106-py310-pymysql102
19 changes: 19 additions & 0 deletions .github/workflows/docker-image-my57-py38-mysqlclient201.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Docker Image CI my57-py38-mysqlclient201

on:
push:
paths:
- 'test-containers/my57-py38-mysqlclient201/**'
- '.github/workflows/docker-image-my57-py38-mysqlclient201.yml'
- '.github/workflows/build-docker-image.yml'

jobs:

call-workflow-passing-data:
uses: ./.github/workflows/build-docker-image.yml
secrets: inherit
with:
registry: ghcr.io
image_name: test-container-my57-py38-mysqlclient201
context: test-containers/my57-py38-mysqlclient201
19 changes: 19 additions & 0 deletions .github/workflows/docker-image-my57-py38-pymysql0711.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Docker Image CI my57-py38-pymysql0711

on:
push:
paths:
- 'test-containers/my57-py38-pymysql0711/**'
- '.github/workflows/docker-image-my57-py38-pymysql0711.yml'
- '.github/workflows/build-docker-image.yml'

jobs:

call-workflow-passing-data:
uses: ./.github/workflows/build-docker-image.yml
secrets: inherit
with:
registry: ghcr.io
image_name: test-container-my57-py38-pymysql0711
context: test-containers/my57-py38-pymysql0711
19 changes: 19 additions & 0 deletions .github/workflows/docker-image-my57-py38-pymysql093.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Docker Image CI my57-py38-pymysql093

on:
push:
paths:
- 'test-containers/my57-py38-pymysql093/**'
- '.github/workflows/docker-image-my57-py38-pymysql093.yml'
- '.github/workflows/build-docker-image.yml'

jobs:

call-workflow-passing-data:
uses: ./.github/workflows/build-docker-image.yml
secrets: inherit
with:
registry: ghcr.io
image_name: test-container-my57-py38-pymysql093
context: test-containers/my57-py38-pymysql093
19 changes: 19 additions & 0 deletions .github/workflows/docker-image-my80-py310-mysqlclient211.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Docker Image CI my80-py310-mysqlclient211

on:
push:
paths:
- 'test-containers/my80-py310-mysqlclient211/**'
- '.github/workflows/docker-image-my80-py310-mysqlclient211.yml'
- '.github/workflows/build-docker-image.yml'

jobs:

call-workflow-passing-data:
uses: ./.github/workflows/build-docker-image.yml
secrets: inherit
with:
registry: ghcr.io
image_name: test-container-my80-py310-mysqlclient211
context: test-containers/my80-py310-mysqlclient211
19 changes: 19 additions & 0 deletions .github/workflows/docker-image-my80-py310-pymysql102.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Docker Image CI my80-py310-pymysql102

on:
push:
paths:
- 'test-containers/my80-py310-pymysql102/**'
- '.github/workflows/docker-image-my80-py310-pymysql102.yml'
- '.github/workflows/build-docker-image.yml'

jobs:

call-workflow-passing-data:
uses: ./.github/workflows/build-docker-image.yml
secrets: inherit
with:
registry: ghcr.io
image_name: test-container-my80-py310-pymysql102
context: test-containers/my80-py310-pymysql102
19 changes: 19 additions & 0 deletions .github/workflows/docker-image-my80-py38-mysqlclient201.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Docker Image CI my80-py38-mysqlclient201

on:
push:
paths:
- 'test-containers/my80-py38-mysqlclient201/**'
- '.github/workflows/docker-image-my80-py38-mysqlclient201.yml'
- '.github/workflows/build-docker-image.yml'

jobs:

call-workflow-passing-data:
uses: ./.github/workflows/build-docker-image.yml
secrets: inherit
with:
registry: ghcr.io
image_name: test-container-my80-py38-mysqlclient201
context: test-containers/my80-py38-mysqlclient201
19 changes: 19 additions & 0 deletions .github/workflows/docker-image-my80-py38-pymysql093.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Docker Image CI my80-py38-pymysql093

on:
push:
paths:
- 'test-containers/my80-py38-pymysql093/**'
- '.github/workflows/docker-image-my80-py38-pymysql093.yml'
- '.github/workflows/build-docker-image.yml'

jobs:

call-workflow-passing-data:
uses: ./.github/workflows/build-docker-image.yml
secrets: inherit
with:
registry: ghcr.io
image_name: test-container-my80-py38-pymysql093
context: test-containers/my80-py38-pymysql093
19 changes: 19 additions & 0 deletions .github/workflows/docker-image-my80-py39-mysqlclient203.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Docker Image CI my80-py39-mysqlclient203

on:
push:
paths:
- 'test-containers/my80-py39-mysqlclient203/**'
- '.github/workflows/docker-image-my80-py39-mysqlclient203.yml'
- '.github/workflows/build-docker-image.yml'

jobs:

call-workflow-passing-data:
uses: ./.github/workflows/build-docker-image.yml
secrets: inherit
with:
registry: ghcr.io
image_name: test-container-my80-py39-mysqlclient203
context: test-containers/my80-py39-mysqlclient203
19 changes: 19 additions & 0 deletions .github/workflows/docker-image-my80-py39-pymysql093.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Docker Image CI my80-py39-pymysql093

on:
push:
paths:
- 'test-containers/my80-py39-pymysql093/*'
- '.github/workflows/docker-image-my80-py39-pymysql093.yml'
- '.github/workflows/build-docker-image.yml'

jobs:

call-workflow-passing-data:
uses: ./.github/workflows/build-docker-image.yml
secrets: inherit
with:
registry: ghcr.io
image_name: test-container-my80-py39-pymysql093
context: test-containers/my80-py39-pymysql093
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/tests/output/
/tests/integration/inventory
/changelogs/.plugin-cache.yaml
*.swp

Expand Down
Loading