Files
pezkuwi-telemetry/.github/workflows/backend-ci.yml
dependabot[bot] 1f782de7c2 Bump actions/upload-artifact from 4 to 6
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 6.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v6)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-08 13:43:01 +00:00

92 lines
2.0 KiB
YAML

name: Backend CI
on:
push:
branches: [main, master]
paths:
- 'backend/**'
- '.github/workflows/backend-ci.yml'
pull_request:
branches: [main, master]
paths:
- 'backend/**'
- '.github/workflows/backend-ci.yml'
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
check:
runs-on: ubuntu-latest
defaults:
run:
working-directory: backend
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-action@stable
with:
components: rustfmt, clippy
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
backend/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Check formatting
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Build
run: cargo build --release
- name: Run tests
run: cargo test --release
build-binaries:
runs-on: ubuntu-latest
needs: check
defaults:
run:
working-directory: backend
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-action@stable
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
backend/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build release binaries
run: cargo build --release
- name: Upload binaries
uses: actions/upload-artifact@v6
with:
name: backend-binaries
path: |
backend/target/release/telemetry_core
backend/target/release/telemetry_shard
retention-days: 7