Skip to content

Reduce the On-Demand processing #87

Reduce the On-Demand processing

Reduce the On-Demand processing #87

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@692973e3d937129bcbf40652eb9f2f61becf3332 # refs/tags/v4.1.7
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # refs/tags/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@692973e3d937129bcbf40652eb9f2f61becf3332 # refs/tags/v4.1.7
- name: Run the sh-checker
uses: luizm/action-sh-checker@c6edb3de93e904488b413636d96c6a56e3ad671a # refs/tags/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@692973e3d937129bcbf40652eb9f2f61becf3332 # refs/tags/v4.1.7
- 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: vm-self-hosted
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_jammy, rocky_9, opensuse_tumbleweed]
provider: [virtualbox, libvirt]
include:
- os: opensuse_leap
provider: virtualbox
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # refs/tags/v4.1.7
- uses: ./.github/actions/vagrant-setup
with:
distro: ${{ matrix.os }}
- name: Vagrant up validation
uses: ./.github/actions/vagrant-up
with:
provider: ${{ matrix.provider }}
os: ${{ matrix.os }}