Skip to content

Swap order of rescues #1663

Swap order of rescues

Swap order of rescues #1663

Workflow file for this run

name: CI
on: [push, pull_request]
defaults:
run:
shell: bash # For -o pipefail
jobs:
lint:
# Run for PRs only if they come from a forked repo (avoids duplicate runs)
if: >-
github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check for tab characters
run: "! grep -P -R '\\t' src/ tests/*.{cpp,py}"
build:
if: >-
github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Build
run: |
cmake -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo
cd build
make -j3
make install
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: sudo apt-get install samtools
- name: Install macOS dependencies
if: runner.os == 'macOS'
run: brew install samtools
- name: Run
run: tests/run.sh
pythonbindings:
if: >-
github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install Python dependencies
run: pip install pytest
- name: Install Python bindings
run: pip install .
- name: Run tests
run: pytest tests
compare:
if: >-
github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Baseline comparison needs older commits
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: sudo apt-get install samtools python3-pysam picard-tools
- name: Install macOS dependencies
if: runner.os == 'macOS'
run: brew install samtools pysam picard-tools
- name: Cache test dataset
uses: actions/cache@v4
with:
key: test-data-${{ hashFiles('tests/download.sh') }}
path: tests/drosophila/
- name: Cache baseline BAM
id: cache-baseline-bam
uses: actions/cache@v4
with:
key: baseline-bam-${{ hashFiles('tests/baseline-commit.txt') }}
path: baseline/bam/
- name: Compare to baseline
run: tests/compare-baseline.sh
- name: Validate with Picard
run: |
PicardCommandLine ValidateSamFile IGNORE=RECORD_MISSING_READ_GROUP IGNORE=MISSING_READ_GROUP I=head.bam