Skip to content

Commit

Permalink
Merge pull request #382 from NeurodataWithoutBorders/clean_testing_wo…
Browse files Browse the repository at this point in the history
…rkflow

Update testing environment name
  • Loading branch information
CodyCBakerPhD authored Sep 20, 2023
2 parents 66a9824 + af34c42 commit 5503e20
Showing 1 changed file with 9 additions and 20 deletions.
29 changes: 9 additions & 20 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ concurrency: # Cancel previous workflows on the same pull request
cancel-in-progress: true

env:
CACHE_NUMBER: 1 # increase to reset cache manually
CACHE_NUMBER: 2 # increase to reset cache manually

jobs:
testing:
Expand All @@ -24,20 +24,14 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- python-version: "3.9"
os: ubuntu-latest
- os: ubuntu-latest
label: environments/environment-Linux.yml
prefix: /usr/share/miniconda3/envs/env-electron-python

- python-version: "3.10"
os: macos-latest
- os: macos-latest
label: environments/environment-Mac.yml
prefix: /Users/runner/miniconda3/envs/env-electron-python

- python-version: "3.9"
os: windows-latest
- os: windows-latest
label: environments/environment-Windows.yml
prefix: C:\Miniconda3\envs\env-electron-python


steps:
Expand All @@ -50,7 +44,7 @@ jobs:
with:
miniforge-variant: Mambaforge
miniforge-version: latest
activate-environment: env-electron-python
activate-environment: nwb-guide
use-mamba: true

- name: Set cache date
Expand All @@ -62,17 +56,12 @@ jobs:
uses: actions/cache@v2
with:
path: ${{ env.CONDA }}/envs
key:
conda-${{ runner.os }}-${{ runner.arch }}-${{steps.get-date.outputs.today }}-${{ hashFiles(matrix.label) }}-${{ env.CACHE_NUMBER }}
env:
# Increase this value to reset cache if environment file has not changed
CACHE_NUMBER: 0
key: conda-${{ runner.os }}-${{ runner.arch }}-${{steps.get-date.outputs.today }}-${{ hashFiles(matrix.label) }}-${{ env.CACHE_NUMBER }}
id: cache

- name: Update environment
run:
mamba env update -n env-electron-python -f ${{ matrix.label }}
if: steps.cache.outputs.cache-hit != 'true'
- if: steps.cache.outputs.cache-hit != 'true'
name: Create and activate environment
run: mamba env update -n nwb-guide -f ${{ matrix.label }}

- name: Use Node.js 18
uses: actions/setup-node@v3
Expand Down

0 comments on commit 5503e20

Please sign in to comment.