-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (39 loc) · 1.13 KB
/
main.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
name: Singularity build
on: [push, pull_request]
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
singularity_version:
- '3.7.3'
container:
image: quay.io/singularity/singularity:v${{ matrix.singularity_version }}
options: --privileged
steps:
- name: Check out code for the container build
uses: actions/checkout@v1
- name: Install useful utilities
run: apk update && apk add --no-cache tree figlet wget
- name: Build and test container
run: |
for DIRECTORY in *
do
if [ -d $DIRECTORY ]; then
if [[ $DIRECTORY != 'images' ]]; then
cd $DIRECTORY
if [ ! -f .ignore ]; then
echo "Building container"
bash ./build.sh
if [ -f ./test.sh ]; then
echo "Running tests"
bash ./test.sh
else
echo "Test file not found. Skipping tests."
fi
fi
cd ..
fi
fi
done