Skip to content

Tweaks for remote components #334

Tweaks for remote components

Tweaks for remote components #334

name: Unit tests and docs
on:
# Triggers the workflow on push or pull request events but only for the main branch
# Remove push when finally merging.
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab.
workflow_dispatch:
jobs:
# This job is called test_docs.
unit_test_and_docs:
# Run on Ubuntu
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it.
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install, run unit test, build docs
run: |
echo "=============================================================";
echo "Run #${GITHUB_RUN_NUMBER}";
echo "Run ID: ${GITHUB_RUN_ID}";
echo "Testing: ${GITHUB_REPOSITORY}";
echo "Triggered by: ${GITHUB_EVENT_NAME}";
echo "Initiated by: ${GITHUB_ACTOR}";
echo "=============================================================";
echo "=============================================================";
echo "Create conda environment";
echo "=============================================================";
source $CONDA/etc/profile.d/conda.sh;
echo $CONDA/bin >> $GITHUB_PATH;
conda create -n OpenMDAO -c conda-forge python=3.9 mamba=1.5.1 -q -y;
conda activate OpenMDAO;
pip install --upgrade pip
echo "=============================================================";
echo "Install PETSc";
echo "=============================================================";
mamba install -c conda-forge mpi4py=3.1.4 petsc4py=3.19 -q -y;
echo "=============================================================";
echo "Install OpenMDAO";
echo "=============================================================";
cd ..;
pip install testflo;
pip install redbaron
git clone -q https://github.com/OpenMDAO/OpenMDAO;
cd OpenMDAO;
pip install .[all];
cd ../mphys;
pip install -e .[all];
echo "=============================================================";
echo "Install optional dependencies";
echo "=============================================================";
mamba install -c "smdogroup/label/complex" -c smdogroup -c conda-forge "tacs>=3.6.0" funtofem -q -y;
pip install openaerostruct;
echo "=============================================================";
echo "List installed packages/versions";
echo "=============================================================";
conda list;
echo "=============================================================";
echo "Running unit tests";
echo "=============================================================";
cd tests/unit_tests
testflo
echo "=============================================================";
echo "Running integration tests";
echo "=============================================================";
cd ../input_files
chmod +x get-input-files.sh
./get-input-files.sh
cd ../integration_tests
testflo test_tacs_* test_meld_* test_oas_*
echo "=============================================================";
echo "Making docs";
echo "=============================================================";
cd ../../docs
make html