Skip to content

test(android): fix connectToSoundcoreDevice tests #930

test(android): fix connectToSoundcoreDevice tests

test(android): fix connectToSoundcoreDevice tests #930

Workflow file for this run

name: "test"
on:
- push
jobs:
rust_test_linux:
runs-on: ubuntu-latest
container:
image: ubuntu:24.04
steps:
- name: Install basic requirements
run: |
apt-get update
apt-get install -y git curl unzip clang just
- uses: actions/checkout@v4
with:
submodules: true
- name: Install dependencies from apt
run: |
apt-get install -y libdbus-1-dev pkg-config libgtk-4-dev libadwaita-1-dev protobuf-compiler
- name: Install display server
run: |
apt-get install -y xvfb
- name: Install rust
uses: dtolnay/rust-toolchain@stable
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Cache cargo dependencies
uses: Swatinem/rust-cache@v2
- name: Run rust tests
run: xvfb-run --auto-servernum just test-cov
- name: Generate HTML test coverage report
run: just test-cov-report html
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage
path: target/llvm-cov/html/
# Only lib is tested on windows since building gtk takes too long, and lib is the only crate with os specific code
rust_test_windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install just
run: choco install just
- name: Install rust
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo dependencies
uses: Swatinem/rust-cache@v2
- name: Run lib tests
run: just lib/ test
android_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install build tools
uses: ./.github/actions/install-android-build-tools
with:
cache: true
- name: Run android unit tests
working-directory: android
run: ./gradlew testBluetoothDebugUnitTest
# - name: Run android instrumented tests
# working-directory: android
# run: ./gradlew connectedAndroidTest