Skip to content

tests

tests #81

Workflow file for this run

name: tests
on:
push:
pull_request:
branches:
# only branches from forks which have the form 'user:branch-name'
- '**:**'
schedule:
- cron: '42 0 * * 0'
jobs:
run_tests:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python: [3.7, 3.8, 3.9, "3.10"]
add_package: [""]
continue-on-error: [false]
include:
- os: macos-latest
python: 3.9
continue-on-error: false
- os: windows-latest
python: 3.9
continue-on-error: false
- os: ubuntu-latest
python: 3.9
add_package: features
continue-on-error: true
- os: macos-latest
python: 3.9
add_package: features
continue-on-error: true
- os: windows-latest
python: 3.9
add_package: features
continue-on-error: true
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.continue-on-error }}
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- name: Setup conda
uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python }}
environment-file: .github/test_conda_env.yml
- name: install mtspec
if: ${{ matrix.add_package == 'features' }}
continue-on-error: ${{ matrix.continue-on-error }}
run: |
conda install mtspec
- name: install other optional dependencies
if: ${{ matrix.add_package == 'features' }}
continue-on-error: ${{ matrix.continue-on-error }}
run: |
conda install h5py fortran-compiler
pip install obspyh5 toeplitz
- name: print conda environment info
run: |
conda info -a
conda list
- name: install package
run: |
pip install -v --no-deps .
conda list
- name: run test suite
run: |
mkdir empty; cd empty
coverage run --include='*/rf/*' -m rf.tests
coverage xml -o ../coverage.xml
- name: upload coverage
uses: codecov/codecov-action@v3