mirror of
https://github.com/openshift/community.okd.git
synced 2026-03-26 19:03:14 +00:00
* Clean up CI build There were a few problems with the existing build process, such as, the python version not being passed during sanity tests and versions being hard coded elsewhere. This change ensures that each test scenario gets the correct parameters passed through. It also generally cleans up the process for building the test environment to let ansible-galaxy do its thing. This will make sure the correct version of dependencies get installed. * Add changelog fragment
88 lines
2.9 KiB
YAML
88 lines
2.9 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:
|
|
- 3.7
|
|
- 3.8
|
|
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 PYTHON_VERSION='${{ matrix.python }}'
|
|
working-directory: ./ansible_collections/community/okd
|
|
|
|
downstream-sanity-29:
|
|
name: Downstream Sanity (Ⓐ${{ matrix.ansible }}+py${{ matrix.python }})
|
|
strategy:
|
|
matrix:
|
|
ansible:
|
|
- stable-2.9
|
|
- stable-2.10
|
|
- stable-2.11
|
|
python:
|
|
- 3.7
|
|
- 3.8
|
|
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 downstream-test-sanity PYTHON_VERSION='${{ matrix.python }}'
|
|
working-directory: ./ansible_collections/community/okd
|