Merge pull request #190 from PetalNet/feat/console-api-phase2-l3 #539
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 | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| merge_group: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CI: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: voidzero-dev/setup-vp@2dec1e33f4ab2c6d5bce1b0c4607961bb1a3f7a1 # v1.12.0 | |
| with: | |
| # Keep in lockstep with the vite-plus catalog pin (renovate-managed). | |
| # renovate: datasource=npm depName=vite-plus | |
| version: "0.1.24" | |
| cache: true | |
| node-version-file: package.json | |
| run-install: true | |
| sfw: true | |
| - run: vp run check | |
| - run: vp run manypkg | |
| - run: vp dedupe --check -- --prefer-offline | |
| - run: vp run typesync:check | |
| - run: vp run lint:knip | |
| - run: vp run lint:knip:prod | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| DATABASE_URL: "file:/tmp/build.db" | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: voidzero-dev/setup-vp@2dec1e33f4ab2c6d5bce1b0c4607961bb1a3f7a1 # v1.12.0 | |
| with: | |
| # Keep in lockstep with the vite-plus catalog pin (renovate-managed). | |
| # renovate: datasource=npm depName=vite-plus | |
| version: "0.1.24" | |
| cache: true | |
| node-version-file: package.json | |
| run-install: true | |
| sfw: true | |
| - name: Write app env | |
| run: echo "DATABASE_URL=$DATABASE_URL" > apps/collegemap/.env | |
| - run: vp run build | |
| manager-rust: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: apps/manager | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Install tmux | |
| run: sudo apt-get update -q && sudo apt-get install -y -q tmux && tmux -V | |
| - name: Install pinned toolchain (rust-toolchain.toml) | |
| run: rustup toolchain install && rustup component add rustfmt clippy | |
| - run: cargo fmt --check | |
| - run: cargo clippy --all-targets --locked -- -D warnings | |
| - run: cargo test --locked | |
| - name: tmux integration tests (scratch sockets only) | |
| run: N12_TMUX_IT=1 cargo test --locked --test tmux_it -- --ignored | |
| dispatcher-rust: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: apps/dispatcher | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Install pinned toolchain (rust-toolchain.toml) | |
| run: rustup toolchain install && rustup component add rustfmt clippy | |
| - run: cargo fmt --check | |
| - run: cargo clippy --all-targets --locked -- -D warnings | |
| - run: cargo test --locked | |
| control-plane-rust: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: apps/control-plane | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Install pinned toolchain (rust-toolchain.toml) | |
| run: rustup toolchain install && rustup component add rustfmt clippy | |
| - run: cargo fmt --check | |
| - run: cargo clippy --all-targets --locked -- -D warnings | |
| - run: cargo test --locked | |
| box-agent-rust: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: apps/box-agent | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Install pinned toolchain (rust-toolchain.toml) | |
| run: rustup toolchain install && rustup component add rustfmt clippy | |
| - run: cargo fmt --check | |
| - run: cargo clippy --all-targets --locked -- -D warnings | |
| - run: cargo test --locked | |
| typos: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: crate-ci/typos@37bb98842b0d8c4ffebdb75301a13db0267cef89 # v1.47.2 | |
| link-check: | |
| timeout-minutes: 2 | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| with: | |
| path: .lycheecache | |
| key: cache-lychee-${{ github.sha }} | |
| restore-keys: cache-lychee- | |
| - uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 # v2.8.0 | |
| with: | |
| args: --cache --max-cache-age 1d . | |
| token: ${{ github.token }} |