Fix linting issues #88
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: | |
permissions: read-all | |
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@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2 | |
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # 3.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@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2 | |
- name: Run the sh-checker | |
uses: luizm/action-sh-checker@17bd25a6ee188d2b91f677060038f4ba37ba14b2 # 0.9.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@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.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: 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@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2 | |
- 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 }} |