Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workflow for testing dandischema against latest release of dandi-cli #49

Merged
merged 4 commits into from
Jul 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 90 additions & 0 deletions .github/workflows/test-dandi-cli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: Test against dandi-cli

on:
push:
jwodder marked this conversation as resolved.
Show resolved Hide resolved
branches:
- master
pull_request:
schedule:
- cron: '0 6 * * *'

jobs:
test-dandi-cli:
runs-on: ${{ matrix.os }}
env:
NO_ET: 1
strategy:
fail-fast: false
matrix:
os:
- windows-2019
- ubuntu-18.04
- macos-latest
python:
- 3.7
- 3.8
- 3.9
version:
- master
- release
mode:
- normal
include:
- os: ubuntu-18.04
python: 3.7
mode: dandi-devel
version: master
- os: ubuntu-18.04
python: 3.7
mode: dandi-devel
version: release
exclude:
# Temporarily disabled due to h5py/hdf5 dependency issue
# See <https://github.com/dandi/dandi-cli/pull/315>
- os: windows-2019
python: 3.9
steps:
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}

- name: Update pip & install wheel
run: python -m pip install --upgrade pip wheel

- name: Install hdf5 (Ubuntu)
if: matrix.python == '3.9' && startsWith(matrix.os, 'ubuntu')
run: sudo apt-get update && sudo apt-get install -y libhdf5-dev

- name: Install hdf5 (macOS)
if: matrix.python == '3.9' && startsWith(matrix.os, 'macos')
run: |
brew install [email protected]
brew link [email protected]

- name: Install master branch of dandi
if: ${{ matrix.version == 'master' }}
run: pip install "dandi[test] @ git+https://github.com/dandi/dandi-cli.git"

- name: Install latest release of dandi
if: ${{ matrix.version == 'release' }}
run: pip install "dandi[test]"

- name: Set DANDI_DEVEL=1
if: matrix.mode == 'dandi-devel'
run: echo DANDI_DEVEL=1 >> "$GITHUB_ENV"

- name: Check out dandischema
uses: actions/checkout@v2
with:
# Fetch all commits so that versioneer will return something
# compatible with semantic-version
fetch-depth: 0
path: dandischema

- name: Install dandischema
run: pip install .
working-directory: dandischema

- name: Run dandi-cli tests
run: python -m pytest -s -v --pyargs dandi