change parameters #19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [ main, master, develop ] | |
| pull_request: | |
| branches: [ main, master, develop ] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| jobs: | |
| test: | |
| name: Test on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| rust: [stable, beta] | |
| include: | |
| - os: ubuntu-latest | |
| rust: stable | |
| cache-key: linux-stable | |
| - os: macos-latest | |
| rust: stable | |
| cache-key: macos-stable | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install system dependencies (Ubuntu) | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libcurl4-openssl-dev \ | |
| libssl-dev \ | |
| zlib1g-dev \ | |
| libbz2-dev \ | |
| liblzma-dev \ | |
| samtools \ | |
| bcftools | |
| - name: Install system dependencies (macOS) | |
| if: matrix.os == 'macos-latest' | |
| run: | | |
| brew install samtools bcftools || true | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-${{ matrix.cache-key }}-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-${{ matrix.cache-key }}- | |
| - name: Build project | |
| run: cargo build --release --verbose | |
| - name: Test help command | |
| run: | | |
| cargo run --release -- --help || true | |
| cargo run --release -- quick-start --help || true | |
| cargo run --release -- filter --help || true | |
| cargo run --release -- build --help || true | |
| cargo run --release -- correct --help || true | |
| cargo run --release -- call --help || true | |
| cargo run --release -- asm --help || true | |
| cargo run --release -- methyl --help || true | |
| integration-test: | |
| name: Integration Test | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libcurl4-openssl-dev \ | |
| libssl-dev \ | |
| zlib1g-dev \ | |
| libbz2-dev \ | |
| liblzma-dev \ | |
| samtools \ | |
| bcftools | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Build project | |
| run: cargo build --release | |
| - name: Test Himito quick-start command | |
| run: | | |
| if [ -f "test_data/HG005_100x.bam" ] && [ -f "test_data/HG005_100x.bai" ]; then | |
| cargo run --release -- quick-start \ | |
| -i test_data/HG005_100x.bam \ | |
| -c "chrM" \ | |
| -k 21 \ | |
| --sampleid HG005 \ | |
| -r test_data/rCRS.fasta \ | |
| --output-prefix test_output/himito_test || echo "Himito test skipped - may require additional dependencies" | |
| else | |
| echo "Test data not available, skipping evaluate test" | |
| fi | |
| - name: Cleanup test outputs | |
| if: always() | |
| run: | | |
| rm -rf test_output test_data || true | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Check for common issues | |
| run: | | |
| # Check for unsafe code usage | |
| if grep -r "unsafe" src/ --include="*.rs" | grep -v "// SAFETY" | grep -v "unsafe {"; then | |
| echo "Warning: Found unsafe code without safety comments" | |
| fi | |