-
Notifications
You must be signed in to change notification settings - Fork 10
103 lines (91 loc) · 2.85 KB
/
test-dandi-cli.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: Test against dandi-cli
on:
push:
branches:
- master
pull_request:
schedule:
- cron: '0 6 * * *'
jobs:
test-dandi-cli:
runs-on: ${{ matrix.os }}
env:
NO_ET: 1
DANDI_ALLOW_LOCALHOST_URLS: 1
DANDI_TESTS_PULL_DOCKER_COMPOSE: 0
strategy:
fail-fast: false
matrix:
os:
- windows-2019
- ubuntu-latest
- macos-latest
python:
# Use the only Python which is ATM also used by dandi-api
# - 3.9
# - '3.10'
- '3.11'
# - '3.12'
version:
- master
- release
mode:
- normal
include:
- os: ubuntu-latest
python: 3.9
mode: dandi-devel
version: master
- os: ubuntu-latest
python: 3.9
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@v5
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.10' && startsWith(matrix.os, 'ubuntu')
run: sudo apt-get update && sudo apt-get install -y libhdf5-dev
- name: Install hdf5 (macOS)
if: matrix.python == '3.10' && 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,extras] @ git+https://github.com/dandi/dandi-cli.git"
- name: Install latest release of dandi
if: ${{ matrix.version == 'release' }}
run: pip install "dandi[test,extras]"
- name: Set DANDI_DEVEL=1
if: matrix.mode == 'dandi-devel'
run: echo DANDI_DEVEL=1 >> "$GITHUB_ENV"
- name: Check out dandischema
uses: actions/checkout@v4
with:
# Fetch all commits so that versioningit will return something
# compatible with semantic-version
fetch-depth: 0
path: dandischema
- name: Install dandischema
run: pip install .
working-directory: dandischema
- name: Build dandi-api image with this version of dandischema
if: startsWith(matrix.os, 'ubuntu')
run: |
docker build \
-t dandiarchive/dandiarchive-api \
-f tools/api-with-schema.Dockerfile \
.
working-directory: dandischema
- name: Run dandi-cli tests
run: python -m pytest -s -v --pyargs dandi