mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-03-26 21:33:02 +00:00
* Rename from community.kubernetes to kubernetes.core This goes through and renames community.kubernetes to kubernetes.core. Most of this was generated from the downstream build script that was used on the community repository, plus whatever hand edits I could find that were needed. The downstream build and test process has also been removed as this repository is now the downstream repository. * Fix CONTRIBUTING.md
137 lines
4.4 KiB
YAML
137 lines
4.4 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/kubernetes/core
|
|
|
|
- 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/kubernetes/core
|
|
|
|
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/kubernetes/core
|
|
|
|
- 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/kubernetes/core
|
|
|
|
- name: Generate coverage report.
|
|
run: ansible-test coverage xml -v --requirements --group-by command --group-by version
|
|
working-directory: ./ansible_collections/kubernetes/core
|
|
|
|
- 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/kubernetes/core
|
|
|
|
- name: Set up KinD cluster
|
|
uses: engineerd/setup-kind@v0.5.0
|
|
|
|
- name: Set up Python ${{ matrix.python_version }}
|
|
uses: actions/setup-python@v1
|
|
with:
|
|
python-version: ${{ matrix.python_version }}
|
|
|
|
# The 3.3.0 release of molecule introduced a breaking change. See
|
|
# https://github.com/ansible-community/molecule/issues/3083
|
|
- name: Install molecule and openshift dependencies
|
|
run: pip install ansible "molecule<3.3.0" 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/kubernetes/core
|
|
|
|
unit:
|
|
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/kubernetes/core
|
|
|
|
- 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 unit tests on Python ${{ matrix.python_version }}
|
|
run: make test-unit PYTHON_VERSION=${{ matrix.python_version }}
|
|
working-directory: ./ansible_collections/kubernetes/core
|