Merge branch 'master' of http://github.com/ROBelgium/MSNoise #95
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: Full test suite | |
on: [push] | |
jobs: | |
run_tests: | |
runs-on: ${{ matrix.os }} | |
if: | | |
!contains(github.event.head_commit.message, '+ONLYDOCS') && | |
!contains(github.event.head_commit.message, '+NOFULLTEST') | |
strategy: | |
matrix: | |
python-version: ['3.9', '3.10', '3.11'] | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
include: | |
- os: ubuntu-latest | |
label: linux-64 | |
prefix: /usr/share/miniconda3/envs/test | |
- os: macos-latest | |
label: osx-64 | |
prefix: /Users/runner/miniconda3/envs/test | |
- os: windows-latest | |
label: win-64 | |
prefix: C:\Miniconda3\envs\test | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Get current date | |
id: date | |
run: echo "::set-output name=date::$(date +'%Y-%m-%d')" | |
- uses: conda-incubator/[email protected] | |
with: | |
miniforge-variant: Mambaforge | |
miniforge-version: latest | |
activate-environment: test${{ matrix.python-version }} | |
use-mamba: true | |
python-version: ${{ matrix.python-version }} | |
- uses: actions/cache@v2 | |
with: | |
path: ${{ matrix.prefix }}${{ matrix.python-version }} | |
key: ${{ matrix.label }}-conda-py${{ matrix.python-version }}-${{ hashFiles('.github/environment.yml') }}-${{ steps.date.outputs.date }}-${{ env.CACHE_NUMBER }} | |
env: | |
# Increase this value to reset cache if etc/example-environment.yml has not changed | |
CACHE_NUMBER: 1 | |
id: cache | |
- name: Update environment | |
run: mamba env update -n test${{ matrix.python-version }} -f .github/environment.yml | |
if: steps.cache.outputs.cache-hit != 'true' | |
- name: print package info | |
shell: bash -l {0} | |
run: | | |
conda info -a | |
conda list | |
- name: Install MSNoise | |
shell: bash -l {0} | |
run: | | |
pip install -e . | |
- name: Test suite | |
shell: bash -l {0} | |
run: | | |
msnoise utils test |