Skip to content

Add rocky 8 and ubuntu jammy distro support #80

Add rocky 8 and ubuntu jammy distro support

Add rocky 8 and ubuntu jammy distro support #80

Workflow file for this run

---
# 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 All
# yamllint disable-line rule:truthy
on:
push:
paths:
- distros_supported.yml
- '**.sh'
pull_request_review:
types:
- submitted
workflow_dispatch:
jobs:
changes:
runs-on: ubuntu-latest
if: >-
(
github.event_name == 'pull_request_review' &&
github.event.review.state == 'approved'
) ||
github.event_name != 'pull_request_review'
outputs:
scripts: ${{ steps.filter.outputs.scripts }}
steps:
- uses: actions/checkout@v4.1.2
- uses: dorny/paths-filter@v3.0.2
if: ${{ !env.ACT }}
id: filter
with:
token: ${{ secrets.GITHUB_TOKEN }}
filters: |
scripts:
- '**.sh'
check-format:
name: Check scripts format
if: needs.changes.outputs.scripts == 'true'
needs: changes
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.2
- name: Run the sh-checker
uses: luizm/action-sh-checker@v0.8.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SHFMT_OPTS: -i 4 -s
with:
sh_checker_shellcheck_disable: true
check-bash-shellspec:
name: Run BDD shell specs
if: needs.changes.outputs.scripts == 'true'
needs: changes
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.2
- name: Install ShellSpec
run: curl -fsSL https://github.com/shellspec/shellspec/releases/latest/download/shellspec-dist.tar.gz | tar -xz -C ..
- name: Run Shellspec
shell: 'script -q -e -c "bash {0}"'
run: ../shellspec/shellspec --profile --xtrace
check-setup:
name: Check setup script on different distros using libvirt and/or virtualbox providers
runs-on: macos-12
if: >-
(
github.event_name == 'pull_request_review' &&
github.event.review.state == 'approved'
) ||
github.event_name != 'pull_request_review'
strategy:
fail-fast: false
matrix:
os: [ubuntu_focal, ubuntu_bionic, ubuntu_jammy, rocky_8, centos_7, opensuse_tumbleweed]
provider: [all]
include:
- os: opensuse_leap
provider: virtualbox
steps:
- uses: actions/checkout@v4.1.2
- uses: ./.github/actions/vagrant-setup
with:
distro: ${{ matrix.os }}
- name: Check Libvirt Provider
if: matrix.provider == 'libvirt' || matrix.provider == 'all'
uses: ./.github/actions/vagrant-up
with:
provider: libvirt
os: ${{ matrix.os }}
- name: Clenup instance
if: matrix.provider == 'libvirt' || matrix.provider == 'all'
env:
PROVIDER: libvirt
VAGRANT_NAME: ${{ matrix.os }}_libvirt
run: |
vagrant halt "$VAGRANT_NAME"
vagrant destroy -f "$VAGRANT_NAME"
- name: Check VirtualBox Provider
if: matrix.provider == 'virtualbox' || matrix.provider == 'all'
uses: ./.github/actions/vagrant-up
with:
provider: virtualbox
os: ${{ matrix.os }}