-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (72 loc) · 2.65 KB
/
main.yml
File metadata and controls
91 lines (72 loc) · 2.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
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 update && sudo apt-get install -y 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-24.10.6
restore-keys: |
${{ runner.os }}-nextflow-24.10.6
- 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 && sudo mv nextflow /usr/local/bin && sudo chmod +x /usr/local/bin/nextflow
# Cache Docker images
- name: Cache Docker images
id: cache-dockerfiles
uses: actions/cache@v4
with:
path: docker-images.tar
key: ${{ runner.os }}-dockerfiles-${{ hashFiles('docker/**/*') }}
restore-keys: |
${{ runner.os }}-dockerfiles-
- name: Load cached Docker images
if: steps.cache-dockerfiles.outputs.cache-hit == 'true'
run: |
echo "Loading cached Docker images..."
docker load -i docker-images.tar
- name: Build Docker images
if: steps.cache-dockerfiles.outputs.cache-hit != 'true'
run: bash build_containers.sh --docker --github_action
# Run test(s)
- name: test short single list
run: nextflow run rain.nf -profile docker,test_short_single_list
- name: test short paired folder
run: nextflow run rain.nf -profile docker,test_short_paired_folder
- name: test csv mix
run: nextflow run rain.nf -profile docker,test_mix_csv