ci — main #199
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 | |
| run-name: ci — ${{ github.head_ref || github.ref_name }} | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Typecheck | |
| run: npm run typecheck | |
| - name: Test | |
| run: npm test | |
| - name: Prose lint (sentences) | |
| run: npm run lint:prose | |
| # The evaluator with no JavaScript runtime (#86), held to the data-host | |
| # profile's fixtures and to agreement with the reference in that profile. | |
| rust-evaluator: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24' | |
| cache: 'npm' | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: 1.98.1 | |
| targets: wasm32-unknown-unknown | |
| - uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| evaluators/rust/target | |
| key: rust-${{ runner.os }}-${{ hashFiles('evaluators/rust/Cargo.lock') }} | |
| - name: Build and unit-test the evaluator, native and wasm | |
| working-directory: evaluators/rust | |
| run: | | |
| cargo build --release --locked | |
| cargo test --release --locked | |
| cargo build --release --locked --target wasm32-unknown-unknown | |
| - name: Install dependencies | |
| run: npm install | |
| - name: The data-host fixtures and agreement with the reference, in both forms | |
| run: npx vitest run packages/conformance/src/rust-agreement.test.ts packages/conformance/src/rust-wasm-agreement.test.ts | |
| docs-build: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24' | |
| - uses: peaceiris/actions-hugo@v3 | |
| with: | |
| hugo-version: '0.162.1' | |
| extended: true | |
| # The docs build compiles the Rust evaluator to WebAssembly for the | |
| # try-it page (scripts/build-wasm.sh), so it needs the toolchain too. | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: 1.98.1 | |
| targets: wasm32-unknown-unknown | |
| - uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| evaluators/rust/target | |
| key: rust-${{ runner.os }}-${{ hashFiles('evaluators/rust/Cargo.lock') }} | |
| - run: npm run docs:build |