|
| 1 | +name: Workflow integrations |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + push: |
| 6 | + branches: [main] |
| 7 | + |
| 8 | +permissions: |
| 9 | + contents: read |
| 10 | + |
| 11 | +jobs: |
| 12 | + snakemake: |
| 13 | + runs-on: ubuntu-latest |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 |
| 16 | + - uses: dtolnay/rust-toolchain@4be7066ada62dd38de10e7b70166bc74ed198c30 # stable |
| 17 | + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 |
| 18 | + with: |
| 19 | + python-version: '3.11' |
| 20 | + - name: Install pinned workflow tools |
| 21 | + run: | |
| 22 | + python -m pip install snakemake==9.8.1 |
| 23 | + sudo apt-get update |
| 24 | + sudo apt-get install -y samtools |
| 25 | + - name: Prepare indexed toy BAM and CLI |
| 26 | + run: | |
| 27 | + cargo build --locked --bin rosalind |
| 28 | + samtools view -b -F 4 examples/data/illumina_toy/alignments.bam | |
| 29 | + samtools sort -o examples/data/illumina_toy/sorted.bam |
| 30 | + samtools index examples/data/illumina_toy/sorted.bam |
| 31 | + echo "$PWD/target/debug" >> "$GITHUB_PATH" |
| 32 | + - name: Lint, dry-run, and execute local fan-in |
| 33 | + run: | |
| 34 | + snakemake --lint --snakefile integrations/snakemake/Snakefile \ |
| 35 | + --configfile integrations/snakemake/tests/config.yaml |
| 36 | + snakemake --dry-run --cores 1 --snakefile integrations/snakemake/Snakefile \ |
| 37 | + --configfile integrations/snakemake/tests/config.yaml |
| 38 | + snakemake --cores 1 --snakefile integrations/snakemake/Snakefile \ |
| 39 | + --configfile integrations/snakemake/tests/config.yaml |
| 40 | + test -s results/toy/merged.arrow |
| 41 | + test -s results/toy/merged.arrow.manifest.json |
| 42 | + test -s results/toy/verify.json |
| 43 | +
|
| 44 | + nextflow: |
| 45 | + runs-on: ubuntu-latest |
| 46 | + steps: |
| 47 | + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 |
| 48 | + - uses: dtolnay/rust-toolchain@4be7066ada62dd38de10e7b70166bc74ed198c30 # stable |
| 49 | + - uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4 |
| 50 | + with: |
| 51 | + distribution: temurin |
| 52 | + java-version: '21' |
| 53 | + - uses: nf-core/setup-nextflow@98e3b21a1c45e26529208849ec20e5cfb7086040 # v2 |
| 54 | + with: |
| 55 | + version: '25.04.8' |
| 56 | + - name: Parse and execute the local shard graph |
| 57 | + run: | |
| 58 | + sudo apt-get update |
| 59 | + sudo apt-get install -y samtools |
| 60 | + cargo build --locked --bin rosalind |
| 61 | + mkdir -p "$RUNNER_TEMP/nextflow-inputs" |
| 62 | + samtools view -b -F 4 examples/data/illumina_toy/alignments.bam | |
| 63 | + samtools sort -o "$RUNNER_TEMP/nextflow-inputs/sample.bam" |
| 64 | + samtools index "$RUNNER_TEMP/nextflow-inputs/sample.bam" |
| 65 | + target/debug/rosalind reference build \ |
| 66 | + --fasta examples/data/illumina_toy/reference.fa \ |
| 67 | + --output "$RUNNER_TEMP/nextflow-inputs/reference.rref" |
| 68 | + nextflow -c integrations/nextflow/examples/local/nextflow.config \ |
| 69 | + config integrations/nextflow/examples/local/main.nf >/tmp/nextflow-config.txt |
| 70 | + PATH="$PWD/target/debug:$PATH" nextflow run integrations/nextflow/examples/local/main.nf \ |
| 71 | + -work-dir "$RUNNER_TEMP/nextflow-work" \ |
| 72 | + -with-trace "$RUNNER_TEMP/nextflow-trace.txt" \ |
| 73 | + -c integrations/nextflow/examples/local/nextflow.test.config \ |
| 74 | + --reference "$RUNNER_TEMP/nextflow-inputs/reference.rref" \ |
| 75 | + --bam "$RUNNER_TEMP/nextflow-inputs/sample.bam" \ |
| 76 | + --bai "$RUNNER_TEMP/nextflow-inputs/sample.bam.bai" \ |
| 77 | + --shard_count 2 \ |
| 78 | + --image local/rosalind@sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
| 79 | + awk -F '\t' 'NR > 1 && $5 != "COMPLETED" { exit 1 } END { if (NR != 8) exit 1 }' \ |
| 80 | + "$RUNNER_TEMP/nextflow-trace.txt" |
0 commit comments