Skip to content

Add results module

Add results module #51

Workflow file for this run

name: ci
on:
# push:
# branches:
# - 'develop'
pull_request:
branches:
- 'develop'
env:
CACHE_NUMBER: 4 # increase to reset cache manually
jobs:
linux:
strategy:
matrix:
include:
- os: ubuntu-latest
label: linux-64
prefix: /usr/share/miniconda3/envs/fetch3-dev
# - os: windows-latest
# label: win-64
# prefix: C:\Miniconda3\envs\fetch3-dev
name: ${{ matrix.label }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup Mambaforge
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
activate-environment: fetch3-dev
use-mamba: true
- name: Set cache date
run: echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV
- uses: actions/cache@v3
with:
path: ${{ matrix.prefix }}
key: ${{ matrix.label }}-conda-${{ hashFiles('environment.yml') }}-${{ env.DATE }}-${{ env.CACHE_NUMBER }}
id: cache
- name: Update base environment
run: mamba env update -n fetch3-dev -f environment.yml --prune
if: steps.cache.outputs.cache-hit != 'true'
- name: Update environment with dev requirements
run: |
mamba env update -n fetch3-dev -f environment_dev_update.yml
if: steps.cache.outputs.cache-hit != 'true'
- name: export env to artifact
run: mamba env export -n fetch3-dev > environment_ci_${{ matrix.os }}.yml
- uses: actions/upload-artifact@v3
with:
name: environment_ci_${{ matrix.os }}.yml
path: environment_ci_${{ matrix.os }}.yml
- name: Run tests
shell: bash -l {0}
run: pytest -s ./fetch3/tests
# mac:
# strategy:
# matrix:
# include:
# - os: macos-latest
# label: osx-64
# prefix: /Users/runner/miniconda3/envs/boa
# name: ${{ matrix.label }}
# runs-on: ${{ matrix.os }}
# steps:
# - uses: actions/checkout@v2
# - name: Setup Mambaforge
# uses: conda-incubator/setup-miniconda@v2
# with:
# miniforge-variant: Mambaforge
# miniforge-version: latest
# activate-environment: fetch3-dev
# use-mamba: true
# - name: Set cache date
# run: echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV
# - uses: actions/cache@v2
# with:
# path: ${{ matrix.prefix }}
# key: ${{ matrix.label }}-conda-${{ hashFiles('fetch3_requirements_macx86.yml') }}-${{ env.DATE }}-${{ env.CACHE_NUMBER }}
# id: cache
# - name: Update environment
# run: mamba env update -n fetch3-dev -f fetch3_requirements_macx86.yml
# if: steps.cache.outputs.cache-hit != 'true'
# - name: Run tests
# shell: bash -l {0}
# run: pytest -s ./fetch3/tests