From 46832029240e7798233d40b180df93d72e756822 Mon Sep 17 00:00:00 2001 From: Tom Close Date: Wed, 20 Mar 2024 10:15:34 +1100 Subject: [PATCH 1/2] consolidate tests within ci-cd --- .github/workflows/ci-cd.yaml | 49 +++++++++--------------------------- 1 file changed, 12 insertions(+), 37 deletions(-) diff --git a/.github/workflows/ci-cd.yaml b/.github/workflows/ci-cd.yaml index a879998..fab95d4 100644 --- a/.github/workflows/ci-cd.yaml +++ b/.github/workflows/ci-cd.yaml @@ -99,41 +99,9 @@ jobs: 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: @@ -187,19 +155,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: From d7fe6912a6c95639e30532db73e7a629bbdf1694 Mon Sep 17 00:00:00 2001 From: Tom Close Date: Wed, 20 Mar 2024 10:19:21 +1100 Subject: [PATCH 2/2] touched up devcheck in ci-cd --- .github/workflows/ci-cd.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd.yaml b/.github/workflows/ci-cd.yaml index fab95d4..6d267cf 100644 --- a/.github/workflows/ci-cd.yaml +++ b/.github/workflows/ci-cd.yaml @@ -93,7 +93,8 @@ 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__}')"