Skip to content

Enable Krew custom indexes #92

Enable Krew custom indexes

Enable Krew custom indexes #92

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:
- '**.sh'
pull_request_review:
types:
- submitted
jobs:
check-format:
name: Check scripts format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- 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-shellspec:
name: Run BDD shell specs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- 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: bash
run: ../shellspec/shellspec
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.changes }}
steps:
- uses: actions/checkout@v4.1.1
- uses: dorny/paths-filter@v3.0.1
if: ${{ !env.ACT }}
id: filter
with:
token: ${{ secrets.GITHUB_TOKEN }}
filters: .github/filters.yml
generate-matrix:
name: Generate the Test matrix for vagrant and devcontainers
runs-on: ubuntu-latest
needs:
- changes
outputs:
matrix-alias: ${{ steps.set-matrices.outputs.matrix-alias }}
matrix-image: ${{ steps.set-matrices.outputs.matrix-image }}
enable-vagrant-check: ${{ steps.set-matrices.outputs.enable-vagrant-check }}
enable-devcontainers-check: ${{ steps.set-matrices.outputs.enable-devcontainers-check }}
steps:
- uses: actions/checkout@v4.1.1
- id: set-matrices
env:
DEBUG: true
run: ./ci/generate_matrix.sh '${{ needs.changes.outputs.scripts }}'
check-vagrant:
name: Run vagrant validation for all supported Linux distros
if: needs.generate-matrix.outputs.enable-vagrant-check == 'true'
runs-on: macos-12
needs:
- generate-matrix
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.generate-matrix.outputs.matrix-alias) }}
steps:
- uses: actions/checkout@v4.1.1
- uses: ./.github/actions/check-vagrant
with:
vagrant_name: ${{ matrix.name }}
script: ${{ matrix.script }}
check-devcontainer:
name: Run devcontainer validation for all supported Linux distros
if: needs.generate-matrix.outputs.enable-devcontainers-check == 'true'
runs-on: ubuntu-latest
needs:
- generate-matrix
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.generate-matrix.outputs.matrix-image) }}
steps:
- uses: actions/checkout@v4.1.1
- name: Install latest devcontainer CLI
run: npm install -g @devcontainers/cli
- name: Generating tests for '${{ matrix.script }}'
run: |
devcontainer features test --skip-scenarios --features ${{ matrix.script }} --base-image ${{ matrix.image }} --project-folder .