-
Notifications
You must be signed in to change notification settings - Fork 25
63 lines (62 loc) · 1.96 KB
/
singularity_container-install.yml
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
name: Test Singularity Build
on:
# push:
# branches:
# - master
# Do the builds on all pull requests (to test them)
pull_request:
branches:
- "*"
jobs:
changes:
name: Checking changed files
runs-on: ubuntu-latest
outputs:
keepgoing: ${{ steps.changed-files.outputs.any_changed }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v41
with:
files: |
**/*.{yml,yaml,py}
requirements.txt
container/database
container/tests
container/scripts/*.{sh,py}
container/*.{yml,yaml,py,def}
tests
- name: List all changed files
run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
echo "$file was changed"
done
echo ${{ steps.changed-files.outputs.any_changed }}
container:
needs:
- changes
if: needs.changes.outputs.keepgoing == 'true'
runs-on: ubuntu-latest
steps:
- name: Check out code for the container build
uses: actions/checkout@v3
- name: Setup Singularity
uses: singularityhub/install-singularity@main
- name: Extract repository location
shell: bash
run: |
echo "location=$(echo " - git+https://www.github.com/${GITHUB_REPOSITORY}@${GITHUB_REF#refs/heads/}")" >> $GITHUB_OUTPUT
id: extract_location
- name: Build Container
run: |
cd container
echo '${{ steps.extract_location.outputs.location }}' >> environment_test.yml
sudo -E singularity build --notest sc-dandelion.sif sc-dandelion_test.def
- name: Test Container
run: |
cd container
sudo singularity test --writable-tmpfs sc-dandelion.sif
singularity run -B $PWD sc-dandelion.sif dandelion-preprocess --help