Skip to content

Commit

Permalink
Refactor CI actions
Browse files Browse the repository at this point in the history
  • Loading branch information
electrocucaracha committed Sep 18, 2021
1 parent d2a8889 commit d0da956
Show file tree
Hide file tree
Showing 9 changed files with 160 additions and 41 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,18 @@ name: Lint Code Base
# yamllint disable-line rule:truthy
on:
push:
branches:
- 'master'
pull_request:
branches:
- 'master'

jobs:
check-broken-links:
name: Check documentation external links
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check broken links
uses: gaurav-nelson/github-action-markdown-link-check@v1
check-super-linter:
name: Check syntax (super-linter)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -39,6 +37,7 @@ jobs:
PYTHON_FLAKE8_CONFIG_FILE: tox.ini
VALIDATE_PYTHON_MYPY: false
check-tox:
name: Check syntax (tox)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/on-demand_aio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

name: Check All-in-One
name: Check Multus CNI
# yamllint disable-line rule:truthy
on:
push:
Expand Down Expand Up @@ -36,6 +36,7 @@ on:

jobs:
check-multus:
name: Check Multus CNI in an Ubuntu Bionic All-in-One setup
if: >-
(
github.event_name == 'pull_request_review' &&
Expand Down
34 changes: 6 additions & 28 deletions .github/workflows/on-demand_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,32 +35,15 @@ on:
- '!**.md'

jobs:
check-ubuntu:
check-corner-cases:
name: Check K8s Plugins installation methods in an Ubuntu Bionic All-in-One setup
if: >-
(
github.event_name == 'pull_request_review' &&
github.event.review.state == 'approved'
) ||
github.event_name != 'pull_request_review'
runs-on: macos-10.15
strategy:
fail-fast: false
matrix:
include:
- tests_enabled: true
- runtime: crio
kube_version: v1.19.9
kubespray_version: v2.15.1
crun_enabled: true
test_runtimeclasses: true
# TODO: Disable Kata Containers given kataShim comunication issues
# - runtime: crio
# kata_containers_enabled: true
# test_runtimeclasses: true
# - runtime: containerd
# kata_containers_enabled: true
# test_runtimeclasses: true
- test_multinode: true
steps:
- uses: actions/checkout@v2
- name: Cache Vagrant boxes
Expand All @@ -79,17 +62,12 @@ jobs:
env:
VAGRANT_DISABLE_VBOXSYMLINKCREATE: 1
MEMORY: 12288
KRD_CONTAINER_RUNTIME: ${{ matrix.runtime }}
KRD_KUBE_VERSION: ${{ matrix.kube_version }}
KRD_KUBESPRAY_VERSION: ${{ matrix.kubespray_version }}
KRD_CERT_MANAGER_ENABLED: false
KRD_INGRESS_NGINX_ENABLED: false
KRD_ENABLE_TESTS: ${{ matrix.tests_enabled }}
# KRD_KATA_CONTAINERS_ENABLED: ${{ matrix.kata_containers_enabled }}
KRD_CRUN_ENABLED: ${{ matrix.crun_enabled }}
TEST_RUNTIMECLASSES: ${{ matrix.test_runtimeclasses }}
TEST_MULTINODE: ${{ matrix.test_multinode }}
KRD_INT_TESTS: "metallb istio haproxy kubevirt falco knative rook gatekeeper" # TODO: Investigate about the Kong ingress creation issue
KRD_ENABLE_TESTS: true
# TODO: Investigate about the Kong ingress creation issue
# TODO: Investigate about the Rook resource release issue
KRD_INT_TESTS: "metallb istio haproxy kubevirt falco knative gatekeeper"
run: |
cd ci
./bootstrap.sh
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/on-demand_distros.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ on:
- '!**.md'

jobs:
check-all:
check-all-distros:
name: Check all Linux Distributions supported in an All-in-One setup
if: >-
(
github.event_name == 'pull_request_review' &&
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/on-demand_molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ on:

jobs:
bootstrap:
name: Pull python dependencies
if: >-
(
github.event_name == 'pull_request_review' &&
Expand All @@ -48,6 +49,7 @@ jobs:
- run: pip install -r test-requirements.txt
if: steps.cache-tox-molecule.outputs.cache-hit != 'true'
check-molecule:
name: Check Ansible Molecule role tests
needs: bootstrap
runs-on: macos-10.15
strategy:
Expand Down
71 changes: 71 additions & 0 deletions .github/workflows/on-demand_multinode.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
# SPDX-license-identifier: Apache-2.0
##############################################################################
# Copyright (c) 2021
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

name: Check Multinode
# yamllint disable-line rule:truthy
on:
push:
paths:
- '**.sh'
- '!ci/update_*.sh'
- '*.yml'
- '!playbooks/**/*.yml'
- '*.tpl'
- '*.env'
- 'resources/*'
- '!**.md'
pull_request_review:
types:
- submitted
paths:
- '**.sh'
- '!ci/update_*.sh'
- '*.yml'
- '!playbooks/**/*.yml'
- '*.tpl'
- '*.env'
- 'resources/*'
- '!**.md'

jobs:
check-noha:
name: Check Ubuntu Bionic No High Availability setup
if: >-
(
github.event_name == 'pull_request_review' &&
github.event.review.state == 'approved'
) ||
github.event_name != 'pull_request_review'
runs-on: macos-10.15
steps:
- uses: actions/checkout@v2
- name: Cache Vagrant boxes
uses: actions/cache@v2
with:
path: ~/.vagrant.d/boxes
key: ${{ runner.os }}-vagrant-ubuntu-bionic-${{ hashFiles('distros_supported.yml') }}
restore-keys: |
${{ runner.os }}-vagrant-ubuntu-bionic-
- name: Replace shorten links
run: |
find . -type f -iname "*sh" -exec sed -i '.bak' 's|http://bit.ly/install_pkg|https://raw.githubusercontent.com/electrocucaracha/pkg-mgr_scripts/master/install.sh|g' {} \;
find . -type f -iname "*sh" -exec sed -i '.bak' 's|http://bit.ly/install_bin|https://raw.githubusercontent.com/electrocucaracha/pkg-mgr_scripts/master/bindep_install.sh|g' {} \;
find . -type f -name "*.bak" -delete
- name: Run integration tests
env:
VAGRANT_DISABLE_VBOXSYMLINKCREATE: 1
KRD_CERT_MANAGER_ENABLED: false
KRD_INGRESS_NGINX_ENABLED: false
TEST_MULTINODE: true
run: |
cd ci
./bootstrap.sh
./provision_installer.sh
./check.sh
67 changes: 67 additions & 0 deletions .github/workflows/on-demand_runtimes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
# SPDX-license-identifier: Apache-2.0
##############################################################################
# Copyright (c) 2021
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

name: Check Runtime Classes
# yamllint disable-line rule:truthy
on:
push:
paths:
- '**.sh'
- '!ci/update_*.sh'
- '*.yml'
- '!playbooks/**/*.yml'
- '*.tpl'
- '*.env'
- 'resources/*'
- '!**.md'
pull_request_review:
types:
- submitted
paths:
- '**.sh'
- '!ci/update_*.sh'
- '*.yml'
- '!playbooks/**/*.yml'
- '*.tpl'
- '*.env'
- 'resources/*'
- '!**.md'

jobs:
check-runtimeclasses:
name: Check Container Runtime Classes in an Ubuntu Focal All-in-One setup
if: >-
(
github.event_name == 'pull_request_review' &&
github.event.review.state == 'approved'
) ||
github.event_name != 'pull_request_review'
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
include:
- runtime: crio
- runtime: containerd
steps:
- uses: actions/checkout@v2
- name: Deploy services
env:
KRD_CONTAINER_RUNTIME: ${{ matrix.runtime }}
KRD_CERT_MANAGER_ENABLED: false
KRD_INGRESS_NGINX_ENABLED: false
KRD_KATA_CONTAINERS_ENABLED: true
KRD_CRUN_ENABLED: true
KRD_GVISOR_ENABLED: true
run: KRD_FOLDER=$(git rev-parse --show-toplevel) ./aio.sh
- name: Run Multus tests
run: cd tests; ./multus.sh
- name: Undeploy services
run: ./krd_command.sh -a uninstall_k8s
3 changes: 2 additions & 1 deletion .github/workflows/on-demand_virtlet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ on:
- '!**.md'

jobs:
check-ubuntu:
check-virtlet:
name: Check Mirantis Virtlet solution in an Ubuntu Bionic All-in-One setup
if: >-
(
github.event_name == 'pull_request_review' &&
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/spell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,24 @@ on:
paths:
- '**.md'
- '!.github/*'
pull_request:
branches:
- master
paths:
- '**.md'
- '!.github/*'
pull_request_review:
types:
- submitted
paths:
- '**.md'
- '!.github/*'

jobs:
check-reviewdog:
name: Check spelling (reviewdog)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: reviewdog/action-misspell@v1
with:
github_token: ${{ secrets.github_token }}
check-spellcheck:
name: Check spelling (pyspelling)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down

0 comments on commit d0da956

Please sign in to comment.