Fix visitor's link #81
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# 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/[email protected] | |
- uses: dorny/[email protected] | |
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/[email protected] | |
- name: Run the sh-checker | |
uses: luizm/[email protected] | |
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/[email protected] | |
- 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/[email protected] | |
- 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 }} |