Skip to content

feat: analytics compact-str (#326) #749

feat: analytics compact-str (#326)

feat: analytics compact-str (#326) #749

name: backend-unit-tests
on:
workflow_dispatch:
push:
paths:
- "rs/**"
- "Cargo.toml"
- "Cargo.lock"
- "openstream.sample.toml"
- "openstream.sample.jsonc"
branches: [ master, dev ]
pull_request:
paths:
- "rs/**"
- "Cargo.toml"
- "Cargo.lock"
- "openstream.sample.toml"
- "openstream.sample.jsonc"
branches: [ master, dev ]
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: "0"
jobs:
# skip_check:
# runs-on: self-hosted-unit-tests
# outputs:
# should_skip: ${{ steps.skip_check.outputs.should_skip }}
# steps:
# - id: skip_check
# uses: fkirc/skip-duplicate-actions@v5
backend-unit-tests:
# needs: skip_check
# if: needs.skip_check.outputs.should_skip != 'true'
# runs-on: self-hosted-unit-tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
shared-key: unit
cache-all-crates: true
cache-targets: true
cache-on-failure: true
# - uses: actions/cache@v4
# with:
# path: |
# ./target
# ~/.cargo
# key: ${{ runner.os }}-unit-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml', './rs') }}
# restore-keys: |
# ${{ runner.os }}-unit-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml', './rs') }}
# ${{ runner.os }}-unit-
# - name: Local cargo cache
# id: unit-tests-cargo-cache
# uses: MasterworksIO/[email protected]
# with:
# path: ./target/
# key: unit-tests-cargo-target
- name: Cargo Unit Tests
run: cargo test --bins --lib -- --nocapture