Skip to content

Add array tests to the java-to-rust ui tests (#189) #404

Add array tests to the java-to-rust ui tests (#189)

Add array tests to the java-to-rust ui tests (#189) #404

Workflow file for this run

name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
# Allow one instance of this workflow per pull request, and cancel older runs when new changes are pushed
concurrency:
group: ci-yaml-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
java-version: ['17', '21']
jni-version: ['1_6', '1_8']
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: ${{ matrix.java-version }}
- name: Install mdBook
if: matrix.os == 'ubuntu-latest'
run: curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.28/mdbook-v0.4.28-x86_64-unknown-linux-gnu.tar.gz | tar -xz
- name: Build
run: cargo build --verbose
- name: Test crates, jni_${{ matrix.jni-version }}
run: cargo test --all-targets --verbose --features jni_${{ matrix.jni-version }}
- name: Test client crates, jni_${{ matrix.jni-version }}
run: cargo test --all-targets --verbose --manifest-path=test-crates/Cargo.toml --features jni_${{ matrix.jni-version }}
- name: Test book
if: matrix.os == 'ubuntu-latest'
run: ./mdbook test book
coverage:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: 17
- uses: Swatinem/rust-cache@v2
- name: install just
run: |
cargo install just
- name: coverage-deps
run: just coverage-tools
- name:
run: just coverage
env:
NO_OPEN: true
- name: Upload Coverage Report
uses: actions/upload-artifact@v3
with:
name: ui-coverage-report
path: target/ui-coverage-report/