Skip to content

[pre-commit.ci] pre-commit autoupdate #631

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #631

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