* wip: workflows * wip: fix up issues in ci scripts and fix frontend lint errors * wip: fix backend lints * remove unused deps * wip: build frontend in test.yml * wip: attempt to improve Rust caching * wip: testing release * wip: linear release flow * wip: check against both package.json versions * wip: spurious attempt to get Rust caching * wip: more cache * merge release and publish jobs; add more caching to release flow * decouple github releases and npm publishing * update pack flow --------- Co-authored-by: couscous <couscous@runner.com>
57 lines
1.3 KiB
YAML
57 lines
1.3 KiB
YAML
name: Test
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
NODE_VERSION: 22
|
|
PNPM_VERSION: 10.8.1
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Node
|
|
uses: ./.github/actions/setup-node
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
|
|
- name: Lint frontend
|
|
run: cd frontend && npm run lint
|
|
|
|
- name: Format check frontend
|
|
run: cd frontend && npm run format:check
|
|
|
|
- name: Type check frontend
|
|
run: cd frontend && npx tsc --noEmit
|
|
|
|
- name: Install Rust toolchain
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
toolchain: nightly-2025-05-18
|
|
components: rustfmt, clippy
|
|
|
|
- name: Build frontend
|
|
run: cd frontend && npm run build
|
|
|
|
- name: Cache Rust dependencies
|
|
uses: Swatinem/rust-cache@v2
|
|
env:
|
|
RUST_CACHE_DEBUG: true
|
|
with:
|
|
workspaces: "backend"
|
|
|
|
- name: Checks
|
|
run: |
|
|
cargo fmt --all -- --check
|
|
cargo test --workspace
|
|
cargo clippy --all --all-targets --all-features -- -D warnings |