Files
offline_kubespray/collection/community/okd/.github/workflows/ansible-test.yml
ByeonJungHun 360c6eef4a offline 작업
2024-02-19 16:02:29 +09:00

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