Skip to content

fix issues

fix issues #169

Workflow file for this run

name: CI
on:
push:
branches:
- "main"
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test_rain:
# Avoid running twice: skip push events if there's an open PR for this branch
if: github.event_name != 'push' || github.event.pull_request == null
runs-on: ubuntu-24.04
services:
docker:
image: docker:dind
options: --privileged --shm-size=2g
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
steps:
- name: Get the code
uses: actions/checkout@v4
# Install/cache OpenJDK
- name: Cache OpenJDK
id: cache-openjdk
uses: actions/cache@v4
with:
path: /usr/lib/jvm/java-11-openjdk-amd64
key: ${{ runner.os }}-openjdk-11
restore-keys: |
${{ runner.os }}-openjdk-11
- name: Install OpenJDK
if: ${{ steps.cache-openjdk.outputs.cache-hit != 'true' }}
run: sudo apt-get install openjdk-11-jdk
# Install/cache Nextflow
- name: Cache Nextflow
id: cache-nextflow
uses: actions/cache@v4
with:
path: /usr/local/bin/nextflow
key: ${{ runner.os }}-nextflow
restore-keys: |
${{ runner.os }}-nextflow
- name: Install Nextflow
if: ${{ steps.cache-nextflow.outputs.cache-hit != 'true' }}
run: export NXF_VER=24.10.6 && curl -s https://get.nextflow.io | bash && mv nextflow /usr/local/bin && chmod +x /usr/local/bin/nextflow
# Check-out the repo under $GITHUB_WORKSPACE so that the job can access it
- uses: actions/checkout@v4
- name: Cache Dockerfiles and TAR
id: cache-dockerfiles
uses: actions/cache@v4
with:
path: docker-images.tar
key: ${{ runner.os }}-dockerfiles-${{ hashFiles('docker/**/*') }}
- name: Load cached Docker images
id: load-cache
run: |
if [ -f docker-images.tar ]; then
echo "Loading cached Docker images..."
docker load -i docker-images.tar || true
echo "build=false" >> $GITHUB_ENV
else
echo "No Docker cache found"
echo "build=true" >> $GITHUB_ENV
fi
- name: Build images
if: env.build == 'true' || steps.cache-dockerfiles.outputs.cache-hit != 'true'
run: bash build_images.sh github_action
# Run test(s)
- name: test short single
run: nextflow run rain.nf -profile docker,test
- name: test short paired
run: nextflow run rain.nf -profile docker,test2