Skip to content

run commands in end2end test workflow via login shell by using 'bash … #44

run commands in end2end test workflow via login shell by using 'bash …

run commands in end2end test workflow via login shell by using 'bash … #44

Workflow file for this run

name: End-to-end test of EasyBuild in different distros
on: [push, pull_request]
jobs:
build_publish:
name: End-to-end test
runs-on: ubuntu-latest
strategy:
matrix:
container:
- centos-7.9
- centos-8.5
- fedora-36
- opensuse-15.4
- rockylinux-8.7
- ubuntu-20.04
- ubuntu-22.04
fail-fast: false
container:
image: ghcr.io/easybuilders/${{ matrix.container }}-amd64
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: download and unpack easyblocks and easyconfigs repositories
run: |
cd $HOME
for pkg in easyblocks easyconfigs; do
curl -OL https://github.com/easybuilders/easybuild-${pkg}/archive/develop.tar.gz
tar xfz develop.tar.gz
rm -f develop.tar.gz
done
- name: Set up environment
shell: bash
run: |
# set environment variables to be used in subsequent steps,
# see https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable
echo "PATH=$PWD:$PATH" >> $GITHUB_ENV
echo "PYTHONPATH=$PWD:$HOME/easybuild-easyblocks-develop:$HOME/easybuild-easyconfigs-develop" >> $GITHUB_ENV
# tests are run with root privileges, so we need to tell EasyBuild that's OK...
echo "EASYBUILD_ALLOW_USE_AS_ROOT_AND_ACCEPT_CONSEQUENCES=1" >> $GITHUB_ENV
- name: Run commands to check test environment
shell: bash
run: |
cmds=(
"whoami"
"pwd"
"env | sort"
"eb --version"
"eb --show-system-info"
"eb --check-eb-deps"
"eb --show-config"
)
for cmd in "${cmds[@]}"; do
echo ">>> $cmd"
bash -l -c "$cmd"
done
- name: End-to-end test of installing bzip2 with EasyBuild
shell: bash
run: |
bash -l -c "eb bzip2-1.0.8.eb --trace --robot"