Files
kubernetes.core/.github/workflows/ci.yml
Jeff Geerling cbd3a2554e Issue #260: Sanity test 'compile' failing because of positional args. (#261)
* Issue #260: Sanity test 'compile' failing because of positional args.

* Issue #260: Run integration tests on older Python 3.6 still.

* Issue #260: Add changelog fragment.
2020-10-09 10:17:52 -05:00

190 lines
6.0 KiB
YAML

---
name: CI
'on':
push:
branches:
- main
pull_request:
schedule:
- cron: '0 6 * * *'
jobs:
sanity:
runs-on: ubuntu-latest
strategy:
matrix:
python_version: ['2.7', '3.7']
steps:
- name: Check out code
uses: actions/checkout@v2
with:
path: ansible_collections/community/kubernetes
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python_version }}
- name: Install ansible base (devel branch)
run: pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check
- name: Run sanity tests on Python ${{ matrix.python_version }}
run: make test-sanity PYTHON_VERSION=${{ matrix.python_version }}
working-directory: ./ansible_collections/community/kubernetes
integration:
runs-on: ubuntu-latest
strategy:
matrix:
# Our old integration tests fail under newer Python versions.
python_version: ['3.6']
steps:
- name: Check out code
uses: actions/checkout@v2
with:
path: ansible_collections/community/kubernetes
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python_version }}
- name: Install ansible base (devel branch)
run: pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check
- name: Run integration tests on Python ${{ matrix.python_version }}
run: make test-integration PYTHON_VERSION=${{ matrix.python_version }}
working-directory: ./ansible_collections/community/kubernetes
- name: Generate coverage report.
run: ansible-test coverage xml -v --requirements --group-by command --group-by version
working-directory: ./ansible_collections/community/kubernetes
- uses: codecov/codecov-action@v1
with:
fail_ci_if_error: false
molecule:
runs-on: ubuntu-latest
strategy:
matrix:
python_version: ['3.7']
steps:
- name: Check out code
uses: actions/checkout@v2
with:
path: ansible_collections/community/kubernetes
- name: Set up KinD cluster
uses: engineerd/setup-kind@v0.4.0
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python_version }}
- name: Install molecule and openshift dependencies
run: pip install ansible molecule yamllint openshift flake8
# The latest release doesn't work with Molecule currently.
# See: https://github.com/ansible-community/molecule/issues/2757
# - name: Install ansible base, latest release.
# run: |
# pip uninstall -y ansible
# pip install --pre ansible-base
# The devel branch doesn't work with Molecule currently.
# See: https://github.com/ansible-community/molecule/issues/2757
# - name: Install ansible base (devel branch)
# run: |
# pip uninstall -y ansible
# pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check
- name: Create default collection path symlink
run: |
mkdir -p /home/runner/.ansible
ln -s /home/runner/work/kubernetes/kubernetes /home/runner/.ansible/collections
- name: Run molecule default test scenario
run: make test-molecule
working-directory: ./ansible_collections/community/kubernetes
downstream-sanity-29:
runs-on: ubuntu-latest
strategy:
matrix:
python_version: ['3.7']
steps:
- name: Check out code
uses: actions/checkout@v2
with:
path: ansible_collections/community/kubernetes
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python_version }}
- name: Install ansible base (devel branch)
run: pip install "ansible>=2.9.0,<2.10.0"
- name: Run sanity tests on Python ${{ matrix.python_version }}
run: make downstream-test-sanity
working-directory: ./ansible_collections/community/kubernetes
downstream-integration-29:
runs-on: ubuntu-latest
strategy:
matrix:
# Our old integration tests fail under newer Python versions.
python_version: ['3.6']
steps:
- name: Check out code
uses: actions/checkout@v2
with:
path: ansible_collections/community/kubernetes
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python_version }}
- name: Install ansible base (devel branch)
run: pip install "ansible>=2.9.0,<2.10.0"
- name: Run integration tests on Python ${{ matrix.python_version }}
run: make downstream-test-integration
working-directory: ./ansible_collections/community/kubernetes
downstream-molecule-29:
runs-on: ubuntu-latest
strategy:
matrix:
python_version: ['3.7']
steps:
- name: Check out code
uses: actions/checkout@v2
with:
path: ansible_collections/community/kubernetes
- name: Set up KinD cluster
uses: engineerd/setup-kind@v0.4.0
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python_version }}
- name: Install molecule and openshift dependencies
run: pip install "ansible>=2.9.0,<2.10.0" molecule yamllint openshift flake8
- name: Create default collection path symlink
run: |
mkdir -p /home/runner/.ansible
ln -s /home/runner/work/kubernetes/kubernetes /home/runner/.ansible/collections
- name: Run molecule default test scenario
run: make downstream-test-molecule
working-directory: ./ansible_collections/community/kubernetes