checks for system dynamic and system energy is added #532
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: oommf-from-master | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
schedule: | |
- cron: '0 0 * * 1' # run every Monday | |
workflow_dispatch: | |
env: | |
PYTEST_ADDOPTS: "--color=yes" | |
jobs: | |
workflow: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: [3.8] | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- name: Initialisation | |
uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Tk/Tcl | |
run: sudo apt-get install tk-dev tcl-dev | |
- name: Clone OOMMF | |
uses: actions/checkout@v2 | |
with: | |
repository: fangohr/oommf | |
path: opt # to mimic directory structure of conda | |
- name: Compile OOMMF | |
run: | | |
cd opt | |
make build | |
cd .. | |
- name: Create oommf executable | |
run: | | |
mkdir -p bin | |
cat > bin/oommf <<EOF | |
#! /bin/bash | |
tclsh $GITHUB_WORKSPACE/opt/oommf/oommf.tcl "\$@" | |
EOF | |
chmod a+x bin/oommf | |
- name: Set environment variables | |
run: | | |
echo "OOMMFTCL=$GITHUB_WORKSPACE/opt/oommf/oommf.tcl" >> $GITHUB_ENV | |
echo "PATH=$GITHUB_WORKSPACE/bin:$PATH" >> $GITHUB_ENV | |
- name: Install testing packages | |
run: python -m pip install --upgrade pip pytest-cov nbval pycodestyle invoke | |
- name: Install ubermag dependencies | |
run: | | |
python -m pip install git+https://github.com/ubermag/ubermagutil.git | |
python -m pip install git+https://github.com/ubermag/discretisedfield.git | |
python -m pip install git+https://github.com/ubermag/ubermagtable.git | |
python -m pip install git+https://github.com/ubermag/micromagneticmodel.git | |
python -m pip install git+https://github.com/ubermag/micromagnetictests.git | |
python -m pip install git+https://github.com/ubermag/micromagneticdata.git | |
- name: Install package | |
run: python -m pip install . | |
- name: Unit tests | |
run: invoke test.unittest | |
- name: Documentation tests | |
run: invoke test.docs | |
- name: Jupyter notebook tests | |
run: invoke test.ipynb |