Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 49 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Tests
name: Validate Demo

on:
push:
Expand All @@ -7,7 +7,55 @@ on:
jobs:
validate:
runs-on: macos-latest
env:
BASE_CACHE_DIR: ${{ runner.temp }}/base-cache
BASE_SETUP_NOTIFY: "false"
PIP_DISABLE_PIP_VERSION_CHECK: "1"
steps:
- uses: actions/checkout@v4

- name: Install BATS
run: brew install bats-core

- name: Validate repository baseline
run: ./tests/validate.sh

- name: Run demo script tests
run: bats tests/demo_test.bats

- name: Check out Base
run: git clone --depth 1 https://github.com/codeforester/base.git ../base

- name: Detect Base demo support
id: base-demo
run: |
if ../base/bin/basectl demo --help >/dev/null 2>&1; then
echo "supported=true" >> "$GITHUB_OUTPUT"
else
echo "supported=false" >> "$GITHUB_OUTPUT"
echo "Base master does not support basectl demo yet; skipping full Base-backed validation."
fi

- name: Set up Base
if: steps.base-demo.outputs.supported == 'true'
run: ../base/bin/basectl setup base --no-notify

- name: Set up base-demo
if: steps.base-demo.outputs.supported == 'true'
run: ../base/bin/basectl setup base-demo --no-notify

- name: Check base-demo
if: steps.base-demo.outputs.supported == 'true'
run: ../base/bin/basectl check base-demo

- name: Doctor base-demo
if: steps.base-demo.outputs.supported == 'true'
run: ../base/bin/basectl doctor base-demo

- name: Test base-demo
if: steps.base-demo.outputs.supported == 'true'
run: ../base/bin/basectl test base-demo

- name: Run base-demo non-interactively
if: steps.base-demo.outputs.supported == 'true'
run: ../base/bin/basectl demo base-demo -- --non-interactive
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ and versions are tracked in the repo-root `VERSION` file.
- Added a Base manifest, Brewfile, activation source, example command, and
baseline validation script.
- Added the interactive `basectl demo base-demo` walkthrough and BATS coverage.
- Expanded GitHub Actions validation for the demo script and Base-backed demo
flow.