π§ chore(repo): align basic-cli examples, docs, and CI validation #5
This file contains hidden or 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
| name: "CI - Tests" | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| 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 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/checkout@v6 | |
| with: | |
| repository: spore-lang/spore | |
| path: _spore | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: _spore | |
| - name: Build spore compiler | |
| run: cargo build --release --manifest-path _spore/Cargo.toml --bin spore | |
| - name: Check Spore formatting | |
| run: | | |
| # Keep this list to files the current formatter can round-trip today. | |
| _spore/target/release/spore format --check \ | |
| examples/env-reader.sp \ | |
| examples/hello.sp \ | |
| platform/Env.sp \ | |
| platform/Stdin.sp \ | |
| platform/Stdout.sp \ | |
| platform/main.sp \ | |
| tests/platform_check.sp | |
| - name: Check platform modules | |
| run: _spore/target/release/spore check platform/Stdout.sp platform/Stdin.sp platform/File.sp platform/Dir.sp platform/Env.sp platform/Cmd.sp | |
| - name: Run platform Spore test | |
| run: _spore/target/release/spore test tests/platform_check.sp |