-
Notifications
You must be signed in to change notification settings - Fork 17
67 lines (56 loc) · 2.11 KB
/
htcondor.yaml
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
name: Test SnakemakeProfiles/htcondor
env:
SNAKEMAKE_IMAGE: quay.io/biocontainers/snakemake:7.32.4--hdfd78af_1
HTCONDOR_IMAGE: htcondor/mini:23.0-el8
DOCKER_COMPOSE: tests/docker-compose.yaml
on: [push, pull_request]
jobs:
htcondortest:
name: Test htcondor profile in docker containers
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- run: mkdir -p ~/image-cache
- name: cache-conda
uses: actions/cache@v2
env:
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('test-environment.yml') }}
- uses: actions/cache@v2
id: cache-images
env:
CACHE_NUMBER: 0
with:
path: ~/image-cache
key: image-cache-${{ runner.os }}-${{ env.CACHE_NUMBER }}-${{ env.SNAKEMAKE_IMAGE }}-${{ env.HTCONDOR_IMAGE }}
- name: install miniconda
uses: conda-incubator/setup-miniconda@v2
with:
channels: conda-forge,bioconda,defaults
channel-priority: true
environment-file: test-environment.yml
- name: docker swarm init
run: docker swarm init
- if: steps.cache-images.outputs.cache-hit == 'true'
run: docker load -i ~/image-cache/snakemake.tar
- if: steps.cache-images.outputs.cache-hit == 'true'
run: docker load -i ~/image-cache/htcondor.tar
- name: docker deploy
shell: bash -l {0}
env:
DOCKER_COMPOSE: ${{ env.DOCKER_COMPOSE }}
SNAKEMAKE_IMAGE: ${{ env.SNAKEMAKE_IMAGE }}
HTCONDOR_IMAGE: ${{ env.HTCONDOR_IMAGE }}
run: ./tests/deploystack.sh
- if: steps.cache-images.outputs.cache-hit != 'true'
run: docker save -o ~/image-cache/snakemake.tar ${{ env.SNAKEMAKE_IMAGE }}
- if: steps.cache-images.outputs.cache-hit != 'true'
run: docker save -o ~/image-cache/htcondor.tar ${{ env.HTCONDOR_IMAGE }}
- name: run tests
shell: bash -l {0}
run: |
pytest -v -s tests/test_cookie.py
pytest -v -s tests/test_submit.py