Skip to content

Naive tides implementation #1010

Naive tides implementation

Naive tides implementation #1010

name: COMPAS compile test
on:
workflow_dispatch: # allow manual triggering of this workflow
pull_request: # run workflow when PRs made to dev (if following files changed)
branches:
- dev
paths: ['src/**', "compas_python_utils/**", "py_tests/**", ".github/workflows/**"]
push: # always run workflow on push to the following branch
branches:
- dev
jobs:
compas:
name: Build COMPAS
runs-on: ${{ matrix.os}}
container: ${{matrix.container}}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip' # caching pip dependencies
- name: Install dependencies on ubuntu
if: startsWith(matrix.os, 'ubuntu-20')
run: |
cd misc/cicd-scripts
chmod 755 linux-dependencies
./linux-dependencies
- name: Build Compas
run: |
cd src && make -j $(nproc) -f Makefile
./COMPAS -v
- name: Run example COMPAS job
run: |
pip install --upgrade pip
pip install -e .[dev]
export COMPAS_ROOT_DIR=${GITHUB_WORKSPACE}
cd ${GITHUB_WORKSPACE}/py_tests/test_data/
echo "Run example COMPAS job using the config py_tests/test_data/fiducial_bbh_config.yaml"
compas_run_submit fiducial_bbh_config.yaml > example_bbh.log
cat example_bbh.log
echo "Generating detailed evolution plot"
compas_plot_detailed_evolution "./COMPAS_Output/Detailed_Output/BSE_Detailed_Output_0.h5" --dont-show >> example_bbh.log
echo "Out files:"
ls -l
mkdir test_artifacts
mv example_bbh.log test_artifacts/
- name: Run pytests
# Run tests and collect coverage data
run: |
cd ${GITHUB_WORKSPACE}
export COMPAS_ROOT_DIR=${GITHUB_WORKSPACE}
jupyter-kernelspec list
pytest --cov=compas_python_utils/ py_tests/ -m 'not webtest'
pytest --cov=compas_python_utils/ --cov-append py_tests/ -m webtest
coverage html
coverage-badge -o coverage_badge.svg -f
- name: Archive code coverage results
uses: actions/upload-artifact@v3
with:
name: code-coverage
path: |
htmlcov/
coverage_badge.svg
- name: Archive COMPAS run data
uses: actions/upload-artifact@v3
with:
name: COMPAS-run-artifacts
path: |
py_tests/test_artifacts