on:
  pull_request:
  push:
    branches: [main]
jobs:
  # run the automated tests, reporting success if the tests pass and were built
  # without warnings. the examples are run as tests, because we've configured
  # each example target with `test = true` and `harness = false` in Cargo.toml.
  # Trunk build failures caused by problems outside the Rust source code, like
  # missing assets, should be caught by `trunk_build_test`
  test:
    runs-on: docker
    container:
      image: cimg/rust:1.85-node
    defaults:
      run:
        working-directory: app-proto
    steps:
      - uses: https://code.forgejo.org/actions/checkout@v4
      - uses: ./.forgejo/setup-trunk
      - run: echo "$PATH"
      - run: RUSTFLAGS='-D warnings' cargo test