q_tasks 0.1.0

Microscoping task polling for Bevy.
Documentation
name: CI

on: [pull_request, push]

env:
  CARGO_TERM_COLOR: always

jobs:
  build_and_test:
    runs-on: ubuntu-24.04
    steps:
      - uses: actions/checkout@v4

      - name: Checkout sources
        uses: actions/checkout@v4

      - name: Cache
        uses: actions/cache@v4
        with:
          path: |
            ~/.cargo/bin/
            ~/.cargo/registry/index/
            ~/.cargo/registry/cache/
            ~/.cargo/git/db/
            target/
          key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.toml') }}

      - name: Install stable toolchain
        uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy

      - name: Install Dependencies
        run: sudo apt-get update; sudo apt-get install -y --no-install-recommends libasound2-dev libudev-dev

      - name: Run clippy
        run: cargo clippy -- -D warnings

      - uses: taiki-e/install-action@cargo-llvm-cov
      - uses: taiki-e/install-action@nextest

      - name: Generate code coverage
        run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info

      - name: Upload coverage to Codecov
        uses: codecov/codecov-action@v5
        with:
          token: ${{SECRETS.CODECOV_TOKEN}}
          files: lcov.info
          fail_ci_if_error: true
          slug: ada-x64/q_service

      - name: Upload test results to Codecov
        if: ${{ !cancelled() }}
        uses: codecov/test-results-action@v1
        with:
          token: ${{ secrets.CODECOV_TOKEN }}