Update README.md for 02 examples #1772
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: CI_WEIS | |
# We run CI on push commits on all branches | |
on: [push, pull_request] | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
build: | |
name: Build (${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: true | |
matrix: | |
os: ["ubuntu-latest"] #, "macOS-latest"] | |
python-version: ["3.8"] | |
steps: | |
- uses: actions/checkout@v2 | |
# This is the more official way to do miniconda, but it messes with the GitHub worker environment and shell quite a bit | |
#- uses: conda-incubator/setup-miniconda@v2 | |
# # https://github.com/marketplace/actions/setup-miniconda | |
# with: | |
# #miniconda-version: "latest" | |
# channels: conda-forge | |
# auto-update-conda: true | |
# python-version: 3.8 | |
# environment-file: environment.yml | |
# This is a less official, but more lightweight way to do miniconda | |
- uses: s-weigand/setup-conda@v1 | |
# https://github.com/marketplace/actions/setup-conda | |
with: | |
update-conda: true | |
python-version: 3.8 | |
conda-channels: conda-forge | |
activate-conda: true | |
- run: conda env update --file environment.yml | |
#- name: Show custom environment | |
# shell: bash | |
# run: | | |
# cat $GITHUB_ENV | |
# printenv | |
# Install dependencies of WEIS specific to ubuntu | |
- name: Add dependencies ubuntu specific | |
if: false == contains( matrix.os, 'windows') | |
shell: bash | |
# (if you use the shell here, cannot use 'compiler' package otherwise get link problems to system libraries | |
# Mpi only seems to work with the shell command though, so instead rely on system compilers | |
run: | | |
conda install -y petsc4py mpi4py openmpi | |
python -c "import platform; print(platform.node())" | |
# Install dependencies of WISDEM specific to windows | |
- name: Add dependencies windows specific | |
if: contains( matrix.os, 'windows') | |
run: | | |
conda install -y m2w64-toolchain libpython | |
- name: Show custom environment | |
shell: bash | |
run: | | |
conda list | |
# Debugging session | |
#- name: Setup tmate session | |
# uses: mxschmitt/action-tmate@v3 | |
# Install WEIS | |
- name: Install WEIS | |
shell: bash | |
run: | | |
python setup.py develop | |
# List the collected tests for debugging purposes | |
- name: List tests | |
shell: bash | |
run: | | |
pytest weis --collect-only | |
# Run all tests within WEIS, but not computationally expensive examples | |
- name: Run tests within WEIS | |
shell: bash | |
run: | | |
pytest weis --cov-config=.coverageac --cov=weis | |
# Run coveralls | |
- name: Run coveralls | |
if: contains( matrix.os, 'ubuntu') | |
# This also works, https://github.com/AndreMiras/coveralls-python-action | |
#uses: AndreMiras/coveralls-python-action@develop | |
shell: bash | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
coveralls --service=github |