mirror of
https://github.com/openshift/community.okd.git
synced 2026-03-26 19:03:14 +00:00
* Update CI for ansible 2.11 This copies the ignore-2.11.txt to ignore-2.12.txt and makes sure the CI build tests against ansible 2.11. * Add changelog fragment
143 lines
4.7 KiB
YAML
143 lines
4.7 KiB
YAML
# README FIRST
|
|
# 1. replace "community/okd" with the correct name, ie "community/zabbix"
|
|
# 2. If you don't have unit tests remove that section
|
|
# 3. If your collection depends on other collections ensure they are installed, see "Install collection dependencies"
|
|
# If you need help please ask in #ansible-devel on Freenode IRC
|
|
|
|
name: CI
|
|
on:
|
|
# Run CI against all pushes (direct commits) and Pull Requests
|
|
- push
|
|
- pull_request
|
|
|
|
jobs:
|
|
|
|
###
|
|
# Sanity tests (REQUIRED)
|
|
#
|
|
# https://docs.ansible.com/ansible/latest/dev_guide/testing_sanity.html
|
|
|
|
sanity:
|
|
name: Sanity (Ⓐ${{ matrix.ansible }}+py${{ matrix.python }})
|
|
strategy:
|
|
matrix:
|
|
ansible:
|
|
- stable-2.9
|
|
- stable-2.10
|
|
- stable-2.11
|
|
- devel
|
|
python:
|
|
- 2.7
|
|
- 3.7
|
|
- 3.8
|
|
exclude:
|
|
- python: 3.8 # blocked by ansible/ansible#70155
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v2
|
|
with:
|
|
path: ansible_collections/community/okd
|
|
|
|
- name: Set up Python ${{ matrix.ansible }}
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: ${{ matrix.python }}
|
|
|
|
# Install the head of the given branch (devel, stable-2.10)
|
|
- name: Install ansible-base (${{ matrix.ansible }})
|
|
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
|
|
|
|
# run ansible-test sanity inside of Docker.
|
|
# The docker container has all the pinned dependencies that are required.
|
|
# Explicitly specify the version of Python we want to test
|
|
- name: Run sanity tests
|
|
run: make upstream-test-sanity TEST_ARGS='--python ${{ matrix.python }}'
|
|
working-directory: ./ansible_collections/community/okd
|
|
|
|
###
|
|
# Integration tests (RECOMMENDED)
|
|
#
|
|
# https://docs.ansible.com/ansible/latest/dev_guide/testing_integration.html
|
|
|
|
# integration:
|
|
# runs-on: ubuntu-latest
|
|
# name: Integration (Ⓐ${{ matrix.ansible }}+py${{ matrix.python }}})
|
|
# strategy:
|
|
# fail-fast: false
|
|
# matrix:
|
|
# ansible:
|
|
# - stable-2.9
|
|
# - stable-2.10
|
|
# - devel
|
|
# python:
|
|
# - 2.7
|
|
# - 3.7
|
|
# - 3.8
|
|
# exclude:
|
|
# - python: 3.8 # blocked by ansible/ansible#70155
|
|
|
|
# steps:
|
|
# - name: Check out code
|
|
# uses: actions/checkout@v2
|
|
# with:
|
|
# path: ansible_collections/community/okd
|
|
|
|
# - name: Set up Python ${{ matrix.ansible }}
|
|
# uses: actions/setup-python@v2
|
|
# with:
|
|
# python-version: ${{ matrix.python }}
|
|
|
|
# - name: Install ansible-base (${{ matrix.ansible }})
|
|
# run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
|
|
|
|
# # OPTIONAL If your integration test requires Python libraries or modules from other collections
|
|
# # Install them like this
|
|
# - name: Install collection dependencies
|
|
# run: ansible-galaxy collection install kubernetes.core -p .
|
|
|
|
# # Run the integration tests
|
|
# - name: Run integration test
|
|
# run: ansible-test integration -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker --coverage
|
|
# working-directory: ./ansible_collections/community/okd
|
|
|
|
# # ansible-test support producing code coverage date
|
|
# - name: Generate coverage report
|
|
# run: ansible-test coverage xml -v --requirements --group-by command --group-by version
|
|
# working-directory: ./ansible_collections/community/okd
|
|
|
|
# # See the reports at https://codecov.io/gh/ansible_collections/GITHUBORG/REPONAME
|
|
# - uses: codecov/codecov-action@v1
|
|
# with:
|
|
# fail_ci_if_error: false
|
|
#
|
|
downstream-sanity-29:
|
|
name: Downstream Sanity (Ⓐ${{ matrix.ansible }}+py${{ matrix.python }})
|
|
strategy:
|
|
matrix:
|
|
ansible:
|
|
- stable-2.9
|
|
python:
|
|
- 3.6
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v2
|
|
with:
|
|
path: ansible_collections/community/okd
|
|
|
|
- name: Set up Python ${{ matrix.ansible }}
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: ${{ matrix.python }}
|
|
|
|
- name: Install ansible 2.9
|
|
run: pip install "ansible>=2.9.0,<2.10.0"
|
|
|
|
# run ansible-test sanity inside of Docker.
|
|
# The docker container has all the pinned dependencies that are required.
|
|
# Explicitly specify the version of Python we want to test
|
|
- name: Run sanity tests
|
|
run: make downstream-test-sanity
|
|
working-directory: ./ansible_collections/community/okd
|