1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

[stable-4] Run tests with EOL ansible-core versions in GHA (#6071)

* Run tests with EOL ansible-core versions in GHA (#6044)

Run tests with EOL ansible-core versions in GHA.

(cherry picked from commit b72b7d4936)

* Re-schedule cron.

* Use correct targets.

* Restrict python-gitlab to < 3.13.0.

* Fix Ubuntu 16.04 check.

* Revert "Restrict python-gitlab to < 3.13.0."

This reverts commit 3f3a519d79.

* Add extra conditions from tests/utils/shippable/units.sh.

* Avoid problematic broken quoting.
This commit is contained in:
Felix Fontein 2023-02-24 14:41:59 +01:00 committed by GitHub
parent 8806d31d4c
commit da85b37764
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 303 additions and 211 deletions

View file

@ -93,45 +93,6 @@ stages:
- test: 2 - test: 2
- test: 3 - test: 3
- test: 4 - test: 4
- stage: Sanity_2_11
displayName: Sanity 2.11
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Test {0}
testFormat: 2.11/sanity/{0}
targets:
- test: 1
- test: 2
- test: 3
- test: 4
- stage: Sanity_2_10
displayName: Sanity 2.10
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Test {0}
testFormat: 2.10/sanity/{0}
targets:
- test: 1
- test: 2
- test: 3
- test: 4
- stage: Sanity_2_9
displayName: Sanity 2.9
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Test {0}
testFormat: 2.9/sanity/{0}
targets:
- test: 1
- test: 2
- test: 3
- test: 4
### Units ### Units
- stage: Units_2_14 - stage: Units_2_14
displayName: Units 2.14 displayName: Units 2.14
@ -174,41 +135,6 @@ stages:
- test: 2.6 - test: 2.6
- test: 3.5 - test: 3.5
- test: 3.8 - test: 3.8
- stage: Units_2_11
displayName: Units 2.11
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Python {0}
testFormat: 2.11/units/{0}/1
targets:
- test: 2.6
- test: 2.7
- test: 3.5
- test: 3.9
- stage: Units_2_10
displayName: Units 2.10
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Python {0}
testFormat: 2.10/units/{0}/1
targets:
- test: 2.7
- test: 3.6
- stage: Units_2_9
displayName: Units 2.9
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Python {0}
testFormat: 2.9/units/{0}/1
targets:
- test: 2.6
- test: 3.5
## Remote ## Remote
- stage: Remote_2_14 - stage: Remote_2_14
@ -266,55 +192,6 @@ stages:
groups: groups:
- 1 - 1
- 2 - 2
- stage: Remote_2_11
displayName: Remote 2.11
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
testFormat: 2.11/{0}
targets:
- name: RHEL 7.9
test: rhel/7.9
- name: RHEL 8.3
test: rhel/8.3
#- name: FreeBSD 12.2
# test: freebsd/12.2
groups:
- 1
- 2
- stage: Remote_2_10
displayName: Remote 2.10
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
testFormat: 2.10/{0}
targets:
- name: OS X 10.11
test: osx/10.11
- name: macOS 10.15
test: macos/10.15
groups:
- 1
- 2
- stage: Remote_2_9
displayName: Remote 2.9
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
testFormat: 2.9/{0}
targets:
- name: RHEL 8.2
test: rhel/8.2
- name: RHEL 7.8
test: rhel/7.8
#- name: FreeBSD 12.0
# test: freebsd/12.0
groups:
- 1
- 2
### Docker ### Docker
- stage: Docker_2_14 - stage: Docker_2_14
@ -377,49 +254,6 @@ stages:
- 1 - 1
- 2 - 2
- 3 - 3
- stage: Docker_2_11
displayName: Docker 2.11
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
testFormat: 2.11/linux/{0}
targets:
- name: Fedora 33
test: fedora33
- name: Alpine 3
test: alpine3
groups:
- 2
- 3
- stage: Docker_2_10
displayName: Docker 2.10
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
testFormat: 2.10/linux/{0}
targets:
- name: Fedora 32
test: fedora32
- name: Ubuntu 16.04
test: ubuntu1604
groups:
- 2
- 3
- stage: Docker_2_9
displayName: Docker 2.9
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
testFormat: 2.9/linux/{0}
targets:
- name: Fedora 31
test: fedora31
groups:
- 2
- 3
### Community Docker ### Community Docker
- stage: Docker_community_2_14 - stage: Docker_community_2_14
@ -473,68 +307,23 @@ stages:
testFormat: 2.12/cloud/{0}/1 testFormat: 2.12/cloud/{0}/1
targets: targets:
- test: 3.8 - test: 3.8
- stage: Cloud_2_11
displayName: Cloud 2.11
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Python {0}
testFormat: 2.11/cloud/{0}/1
targets:
- test: 3.6
- stage: Cloud_2_10
displayName: Cloud 2.10
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Python {0}
testFormat: 2.10/cloud/{0}/1
targets:
- test: 3.5
- stage: Cloud_2_9
displayName: Cloud 2.9
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Python {0}
testFormat: 2.9/cloud/{0}/1
targets:
- test: 2.7
- stage: Summary - stage: Summary
condition: succeededOrFailed() condition: succeededOrFailed()
dependsOn: dependsOn:
- Sanity_2_14 - Sanity_2_14
- Sanity_2_9
- Sanity_2_10
- Sanity_2_11
- Sanity_2_12 - Sanity_2_12
- Sanity_2_13 - Sanity_2_13
- Units_2_14 - Units_2_14
- Units_2_9
- Units_2_10
- Units_2_11
- Units_2_12 - Units_2_12
- Units_2_13 - Units_2_13
- Remote_2_14 - Remote_2_14
- Remote_2_9
- Remote_2_10
- Remote_2_11
- Remote_2_12 - Remote_2_12
- Remote_2_13 - Remote_2_13
- Docker_2_14 - Docker_2_14
- Docker_2_9
- Docker_2_10
- Docker_2_11
- Docker_2_12 - Docker_2_12
- Docker_2_13 - Docker_2_13
- Docker_community_2_14 - Docker_community_2_14
- Cloud_2_14 - Cloud_2_14
- Cloud_2_9
- Cloud_2_10
- Cloud_2_11
- Cloud_2_12 - Cloud_2_12
- Cloud_2_13 - Cloud_2_13
jobs: jobs:

220
.github/workflows/ansible-test.yml vendored Normal file
View file

@ -0,0 +1,220 @@
---
# Copyright (c) Ansible Project
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
# For the comprehensive list of the inputs supported by the ansible-community/ansible-test-gh-action GitHub Action, see
# https://github.com/marketplace/actions/ansible-test
name: EOL CI
on:
# Run EOL CI against all pushes (direct commits, also merged PRs), Pull Requests
push:
branches:
- main
- stable-*
pull_request:
# Run EOL CI once per week (at 11:00 UTC)
schedule:
- cron: '0 11 * * 0'
concurrency:
# Make sure there is at most one active run per PR, but do not cancel any non-PR runs
group: ${{ github.workflow }}-${{ (github.head_ref && github.event.number) || github.run_id }}
cancel-in-progress: true
jobs:
sanity:
name: EOL Sanity (Ⓐ${{ matrix.ansible }})
strategy:
matrix:
ansible:
- '2.11'
- '2.10'
- '2.9'
# Ansible-test on various stable branches does not yet work well with cgroups v2.
# Since ubuntu-latest now uses Ubuntu 22.04, we need to fall back to the ubuntu-20.04
# image for these stable branches. The list of branches where this is necessary will
# shrink over time, check out https://github.com/ansible-collections/news-for-maintainers/issues/28
# for the latest list.
runs-on: >-
${{ contains(fromJson(
'["2.9", "2.10", "2.11"]'
), matrix.ansible) && 'ubuntu-20.04' || 'ubuntu-latest' }}
steps:
- name: Perform sanity testing
uses: felixfontein/ansible-test-gh-action@main
with:
ansible-core-github-repository-slug: felixfontein/ansible
ansible-core-version: stable-${{ matrix.ansible }}
coverage: ${{ github.event_name == 'schedule' && 'always' || 'never' }}
pull-request-change-detection: 'true'
testing-type: sanity
units:
# Ansible-test on various stable branches does not yet work well with cgroups v2.
# Since ubuntu-latest now uses Ubuntu 22.04, we need to fall back to the ubuntu-20.04
# image for these stable branches. The list of branches where this is necessary will
# shrink over time, check out https://github.com/ansible-collections/news-for-maintainers/issues/28
# for the latest list.
runs-on: >-
${{ contains(fromJson(
'["2.9", "2.10", "2.11"]'
), matrix.ansible) && 'ubuntu-20.04' || 'ubuntu-latest' }}
name: EOL Units (Ⓐ${{ matrix.ansible }}+py${{ matrix.python }})
strategy:
# As soon as the first unit test fails, cancel the others to free up the CI queue
fail-fast: true
matrix:
ansible:
- ''
python:
- ''
exclude:
- ansible: ''
include:
- ansible: '2.11'
python: '2.6'
- ansible: '2.11'
python: '2.7'
- ansible: '2.11'
python: '3.5'
- ansible: '2.11'
python: '3.9'
- ansible: '2.10'
python: '2.7'
- ansible: '2.10'
python: '3.6'
- ansible: '2.9'
python: '2.6'
- ansible: '2.9'
python: '3.5'
steps:
- name: >-
Perform unit testing against
Ansible version ${{ matrix.ansible }}
uses: felixfontein/ansible-test-gh-action@main
with:
ansible-core-github-repository-slug: felixfontein/ansible
ansible-core-version: stable-${{ matrix.ansible }}
coverage: ${{ github.event_name == 'schedule' && 'always' || 'never' }}
pre-test-cmd: >-
mkdir -p ../../ansible
;
git clone --depth=1 --single-branch https://github.com/ansible-collections/community.internal_test_tools.git ../../community/internal_test_tools
;
if [ ${{ matrix.ansible }} == "2.9" ]; then cp tests/unit/requirements-2.9.txt tests/unit/requirements.txt; fi
;
if [ ${{ matrix.ansible }} == "2.10" ]; then cp tests/unit/requirements-2.10.txt tests/unit/requirements.txt; fi
pull-request-change-detection: 'true'
target-python-version: ${{ matrix.python }}
testing-type: units
integration:
# Ansible-test on various stable branches does not yet work well with cgroups v2.
# Since ubuntu-latest now uses Ubuntu 22.04, we need to fall back to the ubuntu-20.04
# image for these stable branches. The list of branches where this is necessary will
# shrink over time, check out https://github.com/ansible-collections/news-for-maintainers/issues/28
# for the latest list.
runs-on: >-
${{ contains(fromJson(
'["2.9", "2.10", "2.11"]'
), matrix.ansible) && 'ubuntu-20.04' || 'ubuntu-latest' }}
name: EOL I (Ⓐ${{ matrix.ansible }}+${{ matrix.docker }}+py${{ matrix.python }}:${{ matrix.target }})
strategy:
fail-fast: false
matrix:
ansible:
- ''
docker:
- ''
python:
- ''
target:
- ''
exclude:
- ansible: ''
include:
# 2.11
- ansible: '2.11'
docker: fedora33
python: ''
target: shippable/posix/group2/
- ansible: '2.11'
docker: fedora33
python: ''
target: shippable/posix/group3/
- ansible: '2.11'
docker: alpine3
python: ''
target: shippable/posix/group2/
- ansible: '2.11'
docker: alpine3
python: ''
target: shippable/posix/group3/
- ansible: '2.11'
docker: default
python: '3.6'
target: shippable/cloud/group1/
# 2.10
- ansible: '2.10'
docker: fedora32
python: ''
target: shippable/posix/group2/
- ansible: '2.10'
docker: fedora32
python: ''
target: shippable/posix/group3/
- ansible: '2.10'
docker: ubuntu1604
python: ''
target: shippable/posix/group2/
- ansible: '2.10'
docker: ubuntu1604
python: ''
target: shippable/posix/group3/
- ansible: '2.10'
docker: default
python: '3.5'
target: shippable/cloud/group1/
# 2.9
- ansible: '2.9'
docker: fedora31
python: ''
target: shippable/posix/group2/
- ansible: '2.9'
docker: fedora31
python: ''
target: shippable/posix/group3/
- ansible: '2.9'
docker: default
python: '2.7'
target: shippable/cloud/group1/
steps:
- name: >-
Perform integration testing against
Ansible version ${{ matrix.ansible }}
under Python ${{ matrix.python }}
uses: felixfontein/ansible-test-gh-action@main
with:
ansible-core-github-repository-slug: felixfontein/ansible
ansible-core-version: stable-${{ matrix.ansible }}
coverage: ${{ github.event_name == 'schedule' && 'always' || 'never' }}
docker-image: ${{ matrix.docker }}
integration-continue-on-error: 'false'
integration-diff: 'false'
integration-retry-on-error: 'true'
pre-test-cmd: >-
mkdir -p ../../ansible
;
git clone --depth=1 --single-branch https://github.com/ansible-collections/ansible.posix.git ../../ansible/posix
;
git clone --depth=1 ${{ matrix.docker == 'ubuntu1604' && '--branch stable-1' || '' }} --single-branch https://github.com/ansible-collections/community.crypto.git ../../community/crypto
;
git clone --depth=1 --single-branch https://github.com/ansible-collections/community.internal_test_tools.git ../../community/internal_test_tools
pull-request-change-detection: 'true'
target: ${{ matrix.target }}
target-python-version: ${{ matrix.python }}
testing-type: integration

View file

@ -1,6 +1,7 @@
# Community General Collection # Community General Collection
[![Build Status](https://dev.azure.com/ansible/community.general/_apis/build/status/CI?branchName=stable-4)](https://dev.azure.com/ansible/community.general/_build?definitionId=31) [![Build Status](https://dev.azure.com/ansible/community.general/_apis/build/status/CI?branchName=stable-4)](https://dev.azure.com/ansible/community.general/_build?definitionId=31)
[![EOL CI](https://github.com/ansible-collections/community.general/workflows/EOL%20CI/badge.svg?event=push)](https://github.com/ansible-collections/community.general/actions)
[![Codecov](https://img.shields.io/codecov/c/github/ansible-collections/community.general)](https://codecov.io/gh/ansible-collections/community.general) [![Codecov](https://img.shields.io/codecov/c/github/ansible-collections/community.general)](https://codecov.io/gh/ansible-collections/community.general)
This repository contains the `community.general` Ansible Collection. The collection is a part of the Ansible package and includes many modules and plugins supported by Ansible community which are not part of more specialized community collections. This repository contains the `community.general` Ansible Collection. The collection is a part of the Ansible package and includes many modules and plugins supported by Ansible community which are not part of more specialized community collections.

View file

@ -0,0 +1,41 @@
unittest2 ; python_version < '2.7'
importlib ; python_version < '2.7'
# requirement for the memcached cache plugin
python-memcached
# requirement for the redis cache plugin
redis < 4.1.0
# requirement for the linode module
linode-python # APIv3
linode_api4 ; python_version > '2.6' # APIv4
# requirement for the gitlab and github modules
python-gitlab < 2.10.1 ; python_version >= '3.6'
PyGithub
httmock
# requirement for maven_artifact module
lxml < 4.3.0 ; python_version < '2.7' # lxml 4.3.0 and later require python 2.7 or later
lxml ; python_version >= '2.7'
semantic_version
# requirement for datadog_downtime module
datadog-api-client >= 1.0.0b3 ; python_version >= '3.6'
# requirement for dnsimple module
dnsimple >= 2 ; python_version >= '3.6'
dataclasses ; python_version == '3.6'
# requirement for the opentelemetry callback plugin
# WARNING: these libraries rely on Protobuf for Python, which regularly stops installing.
# That's why they are disabled for now.
# opentelemetry-api ; python_version >= '3.6' and python_version < '3.10'
# opentelemetry-exporter-otlp ; python_version >= '3.6' and python_version < '3.10'
# opentelemetry-sdk ; python_version >= '3.6' and python_version < '3.10'
# requirement for the elastic callback plugin
elastic-apm < 6.13.0 ; python_version == '3.6'
elastic-apm ; python_version >= '3.7'
python-gitlab ; python_version < '3.6'

View file

@ -0,0 +1,41 @@
unittest2 ; python_version < '2.7'
importlib ; python_version < '2.7'
# requirement for the memcached cache plugin
python-memcached
# requirement for the redis cache plugin
redis
# requirement for the linode module
linode-python # APIv3
linode_api4 ; python_version > '2.6' # APIv4
# requirement for the gitlab and github modules
python-gitlab
PyGithub
httmock
# requirement for maven_artifact module
lxml < 4.3.0 ; python_version < '2.7' # lxml 4.3.0 and later require python 2.7 or later
lxml ; python_version >= '2.7'
semantic_version
# requirement for datadog_downtime module
datadog-api-client >= 1.0.0b3 ; python_version >= '3.6'
# requirement for dnsimple module
dnsimple >= 2 ; python_version >= '3.6'
dataclasses ; python_version == '3.6'
# requirement for the opentelemetry callback plugin
# WARNING: these libraries rely on Protobuf for Python, which regularly stops installing.
# That's why they are disabled for now.
# opentelemetry-api ; python_version >= '3.6' and python_version < '3.10'
# opentelemetry-exporter-otlp ; python_version >= '3.6' and python_version < '3.10'
# opentelemetry-sdk ; python_version >= '3.6' and python_version < '3.10'
# requirement for the elastic callback plugin
elastic-apm < 6.13.0 ; python_version == '3.6'
elastic-apm ; python_version >= '3.7'
pynacl >= 1.4.0, < 1.5.0; python_version >= '3.6'