Skip to content

πŸ› fix: align platform manifest terminology #55

πŸ› fix: align platform manifest terminology

πŸ› fix: align platform manifest terminology #55

Workflow file for this run

name: "CI - Tests"
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
concurrency:
group: ci-tests-${{ github.ref }}
cancel-in-progress: true
jobs:
host:
name: host
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: host
- name: Build host crate
run: cargo build --manifest-path host/Cargo.toml
- name: Run host tests
run: cargo test --manifest-path host/Cargo.toml
spore:
name: spore
runs-on: ubuntu-latest
env:
SPORE_REPOSITORY: spore-lang/spore
SPORE_REF: d96212aa5a4cfe24759c21d8690642adfd357018
steps:
- uses: actions/checkout@v6
- name: Probe spore compiler access
id: spore-source
run: |
api_url="https://api.github.com/repos/${SPORE_REPOSITORY}/git/commits/${SPORE_REF}"
status="$(curl --silent --show-error --output /dev/null --write-out '%{http_code}' \
-H 'Accept: application/vnd.github+json' \
"${api_url}")"
if [ "${status}" = "200" ]; then
echo "available=true" >> "$GITHUB_OUTPUT"
exit 0
fi
echo "available=false" >> "$GITHUB_OUTPUT"
if [ "${status}" != "404" ]; then
echo "::error::Unexpected response probing ${SPORE_REPOSITORY}@${SPORE_REF} (HTTP ${status})."
exit 1
fi
echo "::warning::Skipping compiler-backed Spore checks because the Spore compiler repository is not accessible. This can be resolved by configuring repository access credentials."
- uses: actions/checkout@v6
if: steps.spore-source.outputs.available == 'true'
with:
repository: ${{ env.SPORE_REPOSITORY }}
ref: ${{ env.SPORE_REF }}
path: _spore
- uses: dtolnay/rust-toolchain@stable
if: steps.spore-source.outputs.available == 'true'
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
if: steps.spore-source.outputs.available == 'true'
with:
workspaces: _spore
- name: Build spore compiler
if: steps.spore-source.outputs.available == 'true'
run: cargo build --release --manifest-path _spore/Cargo.toml --bin spore
- name: Format Spore files
if: steps.spore-source.outputs.available == 'true'
run: |
# `src/host.sp` is a legacy compatibility shim; validate package-backed behavior
# via the example and platform modules rather than standalone file-mode checks.
# Standalone file examples
find examples -maxdepth 1 -name '*.sp' -type f | sort | xargs _spore/target/release/spore format
# Project-mode examples (format their src files)
if [ -d examples/hello-app/src ]; then
find examples/hello-app/src -name '*.sp' -type f | sort | xargs _spore/target/release/spore format
fi
# Platform API modules
find src/basic_cli -name '*.sp' -type f | sort | xargs _spore/target/release/spore format
# Check tests if they exist
if [ -d tests ]; then
find tests -name '*.sp' -type f | sort | xargs _spore/target/release/spore format
fi
git diff --exit-code
- name: Check Spore files
if: steps.spore-source.outputs.available == 'true'
run: |
# `src/host.sp` is a legacy compatibility shim; validate package-backed behavior
# via the example and platform modules rather than standalone file-mode checks.
# Standalone file examples
find examples -maxdepth 1 -name '*.sp' -type f | sort | xargs -n 1 _spore/target/release/spore check
# Platform API modules
find src/basic_cli -name '*.sp' -type f | sort | xargs -n 1 _spore/target/release/spore check
# Project-mode examples: validate with spore check
if [ -d examples/hello-app ]; then
echo "βœ“ Checking project-mode example examples/hello-app/src/main.sp"
_spore/target/release/spore check examples/hello-app/src/main.sp
fi
# Check tests if they exist
if [ -d tests ]; then
find tests -name '*.sp' -type f | sort | xargs -n 1 _spore/target/release/spore check
fi

Check failure on line 125 in .github/workflows/ci-tests.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci-tests.yml

Invalid workflow file

You have an error in your yaml syntax on line 125
- name: Build Spore files
if: steps.spore-source.outputs.available == 'true'
# `src/host.sp` is a legacy compatibility shim; validate package-backed behavior
# via the example and platform modules rather than standalone file-mode builds.
# Standalone file examples
find examples -maxdepth 1 -name '*.sp' -type f | sort | xargs -n 1 _spore/target/release/spore build
# Platform API modules
find src/basic_cli -name '*.sp' -type f | sort | xargs -n 1 _spore/target/release/spore build
# Project-mode examples: validate with spore build
if [ -d examples/hello-app ]; then
echo "βœ“ Building project-mode example examples/hello-app/src/main.sp"
_spore/target/release/spore build examples/hello-app/src/main.sp
fi
# Check tests if they exist
if [ -d tests ]; then
find tests -name '*.sp' -type f | sort | xargs -n 1 _spore/target/release/spore build
fi
- name: Run standalone hello example
if: steps.spore-source.outputs.available == 'true'
run: _spore/target/release/spore run examples/hello.sp
- name: Run project-mode hello-app example
if: steps.spore-source.outputs.available == 'true'
run: |
if [ -d examples/hello-app ]; then
echo "βœ“ Running project-mode example examples/hello-app/src/main.sp"
_spore/target/release/spore run examples/hello-app/src/main.sp
fi
- name: Run Spore spec tests
if: steps.spore-source.outputs.available == 'true'
run: |
if [ ! -d tests ]; then
echo "No Spore spec tests yet; skipping spore test."
exit 0
fi
find tests -name '*.sp' -type f | sort | xargs -r -n 1 _spore/target/release/spore test