station/.github/workflows/test.yml

55 lines
1.2 KiB
YAML

name: Test
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
jobs:
test:
name: Clippy and tests (nextest)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends pkg-config libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Install cargo-nextest
uses: taiki-e/install-action@nextest
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Clippy
run: cargo clippy --workspace --all-targets --locked -- -D warnings
- name: Test
run: cargo nextest run --workspace --locked --profile ci
- uses: actions/setup-node@v4
with:
node-version: '22'
- name: Test Tiled extension
run: node --test tools/tiled.test.cjs
- name: Upload test report
if: always()
uses: actions/upload-artifact@v4
with:
name: junit
path: target/nextest/ci/junit.xml