Skip to content

Build and Test

Build and Test #835

Workflow file for this run

name: Build and Test
on:
pull_request:
branches:
- master
push:
branches:
- master
schedule:
# Run the tests at 00:00 each day
- cron: "0 0 * * *"
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- name: cache conda
uses: actions/cache@v2
env:
# Increase this value to reset cache if etc/example-environment.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('environment_cpu.yml') }}
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: nsd
environment-file: environment_cpu.yml
python-version: 3.9
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
- name: Test with pytest
run: |
conda activate nsd
pytest -v