Skip to content

Update main.yml

Update main.yml #3

Workflow file for this run

name: Container 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
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
cd ..
fi
fi
done