Skip to content

Commit

Permalink
Merge pull request #7 from nipype/develop
Browse files Browse the repository at this point in the history
Consolidate tests within ci/cd
  • Loading branch information
tclose authored Mar 20, 2024
2 parents 9731d29 + d7fe691 commit 1bf1587
Showing 1 changed file with 14 additions and 38 deletions.
52 changes: 14 additions & 38 deletions .github/workflows/ci-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,47 +93,16 @@ jobs:
- name: Install task package
run: |
pip install "./related-packages/fileformats[dev]" "related-packages/fileformats-extras[dev]"
pip install ${{ matrix.pip-flags }} "./related-packages/fileformats[dev]"
pip install ${{ matrix.pip-flags }} "related-packages/fileformats-extras[dev]"
pip install ${{ matrix.pip-flags }} ".[dev]"
python -c "import pydra.tasks.afni as m; print(f'{m.__name__} {m.__version__} @ {m.__file__}')"
python -c "import pydra as m; print(f'{m.__name__} {m.__version__} @ {m.__file__}')"
python -c "import fileformats.medimage_afni as m; print(f'{m.__name__} {m.__version__} @ {m.__file__}')"
python -c "import fileformats.extras.medimage_afni as m; print(f'{m.__name__} {m.__version__} @ {m.__file__}')"
fileformats-test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.11']
steps:

- uses: actions/checkout@v4

- name: Revert version to most recent version tag on upstream update
if: github.event_name == 'repository_dispatch'
run: git checkout $(git tag -l | grep 'v.*' | tail -n 1 | awk -F post '{print $1}')

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install build dependencies
run: |
python -m pip install --upgrade pip
- name: Install task package
run: |
pip install "./related-packages/fileformats[test]" "./related-packages/fileformats-extras[test]"
python -c "import fileformats.medimage_afni as m; print(f'{m.__name__} {m.__version__} @ {m.__file__}')"
- name: Test fileformats with pytest
run: |
pytest ./related-packages -sv --cov fileformats.medimage_afni --cov fileformats.extras.medimage_afni --cov-report xml .
test:
needs: [nipype-conv, fileformats-test]
needs: [nipype-conv]
runs-on: ubuntu-22.04
strategy:
matrix:
Expand Down Expand Up @@ -187,19 +156,26 @@ jobs:
python -c "import pydra as m; print(f'{m.__name__} {m.__version__} @ {m.__file__}')"
- name: Test with pytest
run: |
pytest -sv ./pydra/tasks/afni --cov pydra.tasks.afni --cov-report xml
run: >-
pytest -sv
./pydra/tasks/afni
./related-packages/fileformats
./related-packages/fileformats-extras
--cov pydra.tasks.afni
--cov fileformats.medimage_afni
--cov fileformats.extras.medimage_afni
--cov-report xml
- name: Upload to CodeCov
uses: codecov/codecov-action@v3
if: ${{ always() }}
with:
files: coverage.xml,./fileformats/coverage.xml
files: coverage.xml
name: pydra-afni


deploy-fileformats:
needs: [devcheck, test, fileformats-test]
needs: [devcheck, test]
runs-on: ubuntu-latest
steps:

Expand Down

0 comments on commit 1bf1587

Please sign in to comment.