Add RemoteDandiset.has_data_standard() convenience function #5357
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: Tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
schedule: | |
- cron: '0 6 * * *' | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
env: | |
NO_ET: 1 | |
DANDI_ALLOW_LOCALHOST_URLS: "1" | |
DANDI_PAGINATION_DISABLE_FALLBACK: "1" | |
DANDI_TESTS_PERSIST_DOCKER_COMPOSE: "1" | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- windows-2019 | |
- ubuntu-latest | |
- macos-latest | |
python: | |
- 3.7 | |
- 3.8 | |
- 3.9 | |
- '3.10' # Needs quotes so YAML doesn't think it's 3.1 | |
- '3.11' | |
mode: | |
- normal | |
include: | |
- os: ubuntu-latest | |
python: 3.7 | |
mode: dandi-api | |
- os: ubuntu-latest | |
python: 3.7 | |
mode: dev-deps | |
steps: | |
- name: Set up environment | |
uses: actions/checkout@v3 | |
with: | |
# Fetch all commits so that versioneer will return something compatible | |
# with semantic-version | |
fetch-depth: 0 | |
- name: Set up Python ${{ matrix.python }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip wheel | |
pip install ".[extras,test]" | |
- name: Install dev versions of select dependencies | |
if: matrix.mode == 'dev-deps' | |
run: | | |
pip install git+https://github.com/jaraco/keyring | |
pip install git+https://github.com/NeurodataWithoutBorders/nwbinspector | |
pip install git+https://github.com/NeurodataWithoutBorders/pynwb | |
- name: Run all tests | |
if: matrix.mode != 'dandi-api' | |
run: | | |
python -m pytest -s -v --cov=dandi --cov-report=xml dandi | |
- name: Smoke test example code in docs | |
if: matrix.mode != 'dandi-api' && github.event_name == 'schedule' | |
run: | | |
set -ex | |
cd docs/source/examples | |
for f in *.py | |
do python "$f" | |
done | |
- name: Run Dandi API tests only | |
if: matrix.mode == 'dandi-api' | |
run: | | |
python -m pytest -s -v --cov=dandi --cov-report=xml --dandi-api dandi | |
- name: Dump Docker Compose logs | |
if: failure() && startsWith(matrix.os, 'ubuntu') | |
run: | | |
docker-compose \ | |
-f dandi/tests/data/dandiarchive-docker/docker-compose.yml \ | |
logs --timestamps | |
- name: Shut down Docker Compose | |
if: startsWith(matrix.os, 'ubuntu') | |
run: | | |
docker-compose \ | |
-f dandi/tests/data/dandiarchive-docker/docker-compose.yml \ | |
down -v | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.xml | |
flags: unittests | |
# name: codecov-umbrella | |
# yml: ./codecov.yml | |
fail_ci_if_error: false |