-
Notifications
You must be signed in to change notification settings - Fork 15
96 lines (85 loc) · 3 KB
/
test.yml
File metadata and controls
96 lines (85 loc) · 3 KB
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
name: Tests
on:
push:
pull_request:
schedule:
- cron: '0 6 * * *'
jobs:
test:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
python: ['3.10', '3.11', '3.12', '3.13', '3.14']
vendored_env: [unvendored]
include:
- os: ubuntu-latest
python: '3.10'
vendored_env: dandi
instance_name: DANDI
instance_identifier: 'RRID:SCR_017571'
doi_prefix: '10.80507'
- os: ubuntu-latest
python: '3.10'
vendored_env: ember-dandi
instance_name: EMBER-DANDI
instance_identifier: 'RRID:SCR_026700'
doi_prefix: '10.82754'
- os: ubuntu-latest
python: '3.10'
vendored_env: ember-dandi-no-doi
instance_name: EMBER-DANDI
steps:
- name: Set up environment
uses: actions/checkout@v6
with:
# Fetch all commits so that versioningit will return something
# compatible with semantic-version
fetch-depth: 0
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
python -m pip install --upgrade tox
# Set only if matrix.instance_name is defined
- name: Set DANDI_INSTANCE_NAME
if: ${{ matrix.instance_name }}
run: echo "DANDI_INSTANCE_NAME=${{ matrix.instance_name }}" >> "$GITHUB_ENV"
# Set only if matrix.instance_identifier is defined
- name: Set DANDI_INSTANCE_IDENTIFIER
if: ${{ matrix.instance_identifier }}
run: echo "DANDI_INSTANCE_IDENTIFIER=${{ matrix.instance_identifier }}" >> "$GITHUB_ENV"
# Set only if matrix.doi_prefix is defined
- name: Set DANDI_DOI_PREFIX
if: ${{ matrix.doi_prefix }}
run: echo "DANDI_DOI_PREFIX=${{ matrix.doi_prefix }}" >> "$GITHUB_ENV"
- name: Set DANDI DataCite credentials
if: ${{ matrix.vendored_env == 'dandi' }}
run: |
echo "DATACITE_DEV_LOGIN=${{ secrets.DATACITE_DEV_DANDI_LOGIN }}" >> "$GITHUB_ENV"
echo "DATACITE_DEV_PASSWORD=${{ secrets.DATACITE_DEV_DANDI_PASSWORD }}" >> "$GITHUB_ENV"
- name: Set EMBER DataCite credentials
if: ${{ matrix.vendored_env == 'ember-dandi' }}
run: |
echo "DATACITE_DEV_LOGIN=${{ secrets.DATACITE_DEV_EMBER_LOGIN }}" >> "$GITHUB_ENV"
echo "DATACITE_DEV_PASSWORD=${{ secrets.DATACITE_DEV_EMBER_PASSWORD }}" >> "$GITHUB_ENV"
- name: Run all tests
env:
NO_ET: 1
run: tox -e py -- -s --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
file: ./coverage.xml
flags: unittests
# name: codecov-umbrella
# yml: ./codecov.yml
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}