-
Notifications
You must be signed in to change notification settings - Fork 12
60 lines (56 loc) · 1.67 KB
/
run-tests.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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Unit tests
on:
# push:
# branches: ['**']
pull_request:
branches: ['**']
create:
branches: [main]
tags: ['**']
# schedule:
# - cron: "0 4 * * *"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
strategy:
fail-fast: false
matrix:
# Adjust for min and max supported Python versions
python-version: ["3.12"]
os: [ubuntu-latest, windows-latest, macos-latest, macos-13] # macos-13 is last Intel version
include:
- python-version: "3.10"
os: ubuntu-latest
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -e {0}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: python -m pip install --upgrade pip build
- name: Test building sdist
run: python -m build -s .
- name: Test building wheel
run: python -m build -w .
- name: Install openneuro-py
run: pip install .[tests]
- name: Test CLI commands
run: |
openneuro-py
openneuro-py --help
openneuro-py --version
openneuro-py download --help
openneuro-py login --help
- name: Test with pytest
run: pytest