From cb7d4b9c4afcd3494787ed703bc3127a38b4a7ba Mon Sep 17 00:00:00 2001 From: Jason Garber Date: Wed, 28 Feb 2024 13:36:26 -0500 Subject: [PATCH] Add test suite for actionlint feature --- .github/workflows/test.yml | 8 ---- test/actionlint/actionlint-install-path.sh | 17 ++++++++ test/actionlint/actionlint-version.sh | 17 ++++++++ test/actionlint/scenarios.json | 19 +++++++++ test/actionlint/test.sh | 47 ++++++++++++++++++++++ 5 files changed, 100 insertions(+), 8 deletions(-) create mode 100755 test/actionlint/actionlint-install-path.sh create mode 100755 test/actionlint/actionlint-version.sh create mode 100644 test/actionlint/scenarios.json create mode 100755 test/actionlint/test.sh diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e186cdf..e934ae8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,11 +34,3 @@ jobs: - uses: actions/checkout@v4 - run: npm install -g @devcontainers/cli - run: devcontainer features test -f ${{ matrix.features }} --skip-autogenerated --skip-duplicated . - test-global: - name: Test global scenarios - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v4 - - run: npm install -g @devcontainers/cli - - run: devcontainer features test --global-scenarios-only . diff --git a/test/actionlint/actionlint-install-path.sh b/test/actionlint/actionlint-install-path.sh new file mode 100755 index 0000000..0147da6 --- /dev/null +++ b/test/actionlint/actionlint-install-path.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +set -e + +# Optional: Import test library bundled with the devcontainer CLI +# See https://github.com/devcontainers/cli/blob/HEAD/docs/features/test.md#dev-container-features-test-lib +# Provides the 'check' and 'reportResults' commands. +source dev-container-features-test-lib + +# Feature-specific tests +# The 'check' command comes from the dev-container-features-test-lib. Syntax is... +# check