Fix the build #143
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python Unit Tests | |
on: | |
push: | |
branches: | |
- '*' | |
paths-ignore: | |
- '.github/**' | |
- '**/workflows/**' | |
env: | |
LD_LIBRARY_PATH: /home/runner/hdf5-dir/lib | |
PYTHONPATH: /home/runner/work/mushy-layer/mushy-layer/test:/home/runner/work/mushy-layer/mushy-layer/plotting | |
UNIT_TEST_PATH: /home/runner/work/mushy-layer/mushy-layer/test/unit | |
UNIT_TEST_PUBLISH: /home/runner/work/mushy-layer/mushy-layer/master/test/unit/coverage/ | |
jobs: | |
build: | |
name: Unit tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Setup environmental variables | |
run: | | |
echo "CHOMBO_HOME=$(echo $HOME)/chombo/lib" >> $GITHUB_ENV | |
echo "CHOMBO_ROOT=$(echo $HOME)/chombo" >> $GITHUB_ENV | |
echo "HDF5_PATH=$(echo $HOME)/hdf5-dir" >> $GITHUB_ENV | |
echo "LD_LIBRARY_PATH=$(echo $LD_LIBRARY_PATH):$(echo $HDF5_PATH)/lib" >> $GITHUB_ENV | |
echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/} | sed 's/\//_/g')" >> $GITHUB_ENV | |
- name: Setup latex | |
run: | | |
whereis latex | |
sudo apt-get install texlive-full texlive-fonts-recommended texlive-fonts-extra | |
sudo apt-get install dvipng | |
whereis latex | |
pdflatex --version | |
- name: Info | |
run: | | |
echo $CHOMBO_HOME | |
echo $HOME | |
echo $LD_LIBRARY_PATH | |
echo $GITHUB_WORKSPACE | |
# Do regression tests | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.10 | |
- name: Cache pip | |
uses: actions/cache@v1 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
${{ runner.os }}- | |
- name: Install python dependencies | |
run: pip install --upgrade pip && pip install -r requirements.txt | |
- name: Setup for tests | |
run: | | |
cd $GITHUB_WORKSPACE | |
python install.py -g | |
- name: Run Unit Tests | |
run: | | |
cd $UNIT_TEST_PATH | |
py.test |