-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (70 loc) · 2.19 KB
/
test.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
name: Test
on:
pull_request:
# Due to use of staging and not be able to clean up published dandisets
# https://github.com/dandi/dandi-api/issues/476
# do testing only sparingly (once a week). cron run on drogon will do the
# in-use "testing".
#push:
# branches:
# - master
schedule:
- cron: '0 6 * * 0'
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref_name }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- '3.10'
- '3.11'
- '3.12'
toxenv: [py]
include:
- python-version: '3.10'
toxenv: lint
- python-version: '3.10'
toxenv: typing
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip wheel
python -m pip install --upgrade --upgrade-strategy=eager datalad-installer tox
- name: Install git-annex
run: |
datalad-installer --sudo ok neurodebian git-annex -m neurodebian
# make standalone git take precendence to guarantee compatibility with git-annex
echo "/usr/lib/git-annex.linux/" >> $GITHUB_PATH
- name: Configure Git
run: |
git config --global user.email "github@test.test"
git config --global user.name "GitHub Almighty"
- name: Run tests with coverage
if: matrix.toxenv == 'py'
run: tox -e py -- -vv --cov-report=xml
env:
DANDI_API_KEY: ${{ secrets.DANDI_API_KEY }}
- name: Run generic tests
if: matrix.toxenv != 'py'
run: tox -e ${{ matrix.toxenv }}
- name: Upload coverage to Codecov
if: matrix.toxenv == 'py'
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
name: ${{ matrix.python-version }}
# vim:set et sts=2: