PY39: Support pre-__or__
types
#460
Workflow file for this run
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: Deps & CI | |
on: | |
push: | |
branches: [ '*' ] | |
pull_request: | |
branches: [ master, 'maint/*' ] | |
schedule: | |
- cron: '0 0 * * 1' | |
# Allow job to be triggered manually from GitHub interface | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
jobs: | |
cache-test-data: | |
if: "!contains(github.event.head_commit.message, '[skip ci]')" | |
runs-on: ubuntu-latest | |
env: | |
TEST_DATA_HOME: /home/runner/testdata/nitransforms-tests | |
steps: | |
- name: Git settings (pacify DataLad) | |
run: | | |
git config --global user.name 'NiPreps Bot' | |
git config --global user.email '[email protected]' | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions/cache@v3 | |
id: conda | |
with: | |
path: | | |
/usr/share/miniconda/pkgs | |
/home/runner/.cache/pip | |
key: python-${{ matrix.python-version }}-v1 | |
restore-keys: | | |
python-${{ matrix.python-version }}- | |
- name: Install DataLad | |
run: | | |
$CONDA/bin/conda install -c conda-forge git-annex | |
python -m pip install datalad datalad-next datalad-osf | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ env.TEST_DATA_HOME }} | |
key: data-cache-v2 | |
restore-keys: | | |
data-cache-v2 | |
- name: Install test data | |
run: | | |
export PATH=$CONDA/bin:$PATH | |
mkdir -p /home/runner/testdata | |
datalad install https://gin.g-node.org/oesteban/nitransforms-tests /home/runner/testdata/nitransforms-tests | |
datalad update --merge -d /home/runner/testdata/nitransforms-tests/ | |
datalad get -J 2-d /home/runner/testdata/nitransforms-tests/ | |
build-linux: | |
if: "!contains(github.event.head_commit.message, '[skip ci]')" | |
runs-on: ubuntu-latest | |
env: | |
TEST_DATA_HOME: /home/runner/testdata/nitransforms-tests | |
strategy: | |
max-parallel: 5 | |
matrix: | |
python-version: ['3.8', '3.9', '3.10', '3.11'] | |
steps: | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ env.TEST_DATA_HOME }} | |
key: data-cache-v2 | |
restore-keys: | | |
data-cache-v2 | |
- uses: actions/checkout@v3 | |
- name: Install minimal dependencies | |
run: | | |
pip install .[tests] | |
- name: Run pytest | |
run: | | |
pytest -v --cov nitransforms --cov-config .coveragerc --cov-report xml:cov.xml --doctest-modules nitransforms/ | |
- name: Submit code coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
files: cov.xml |