|
| 1 | +name: pytest |
| 2 | +concurrency: |
| 3 | + group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }} |
| 4 | + cancel-in-progress: true |
| 5 | +on: # yamllint disable-line rule:truthy |
| 6 | + pull_request: |
| 7 | + push: |
| 8 | + branches: [main] |
| 9 | + workflow_dispatch: |
| 10 | + schedule: |
| 11 | + - cron: '0 8 * * 1' |
| 12 | + |
| 13 | +jobs: |
| 14 | + pytest-compat: |
| 15 | + timeout-minutes: 30 |
| 16 | + strategy: |
| 17 | + fail-fast: false |
| 18 | + matrix: |
| 19 | + python-version: ["3.7"] |
| 20 | + name: pip compat - py${{ matrix.python-version }} |
| 21 | + runs-on: ubuntu-latest |
| 22 | + defaults: |
| 23 | + run: |
| 24 | + shell: bash |
| 25 | + steps: |
| 26 | + - name: Checkout repository |
| 27 | + uses: actions/checkout@v4 |
| 28 | + - name: Setup Python ${{ matrix.python-version }} |
| 29 | + uses: actions/setup-python@v5 |
| 30 | + with: |
| 31 | + python-version: ${{ matrix.python-version }} |
| 32 | + architecture: 'x64' |
| 33 | + - name: Install dependencies |
| 34 | + run: | |
| 35 | + python -m pip install --progress-bar off --upgrade pip setuptools |
| 36 | + python -m pip install --progress-bar off .[all,style] |
| 37 | + python -m pip install --progress-bar off pytest pytest-cov coverage |
| 38 | + - name: Run pytest |
| 39 | + run: pytest nigsp --cov=nigsp --cov-report=xml --cov-config=setup.cfg |
| 40 | + - name: Upload to codecov |
| 41 | + uses: codecov/codecov-action@v4 |
| 42 | + with: |
| 43 | + files: ./coverage.xml |
| 44 | + flags: unittests # optional |
| 45 | + name: codecov-umbrella # optional |
| 46 | + token: ${{ secrets.CODECOV_TOKEN }} |
| 47 | + verbose: true # optional (default = false) |
| 48 | + pytest-pip-pre: |
| 49 | + timeout-minutes: 30 |
| 50 | + strategy: |
| 51 | + fail-fast: false |
| 52 | + matrix: |
| 53 | + python-version: ["3.11"] |
| 54 | + name: pip pre-release - py${{ matrix.python-version }} |
| 55 | + runs-on: ubuntu-latest |
| 56 | + defaults: |
| 57 | + run: |
| 58 | + shell: bash |
| 59 | + steps: |
| 60 | + - name: Checkout repository |
| 61 | + uses: actions/checkout@v4 |
| 62 | + - name: Setup Python ${{ matrix.python-version }} |
| 63 | + uses: actions/setup-python@v5 |
| 64 | + with: |
| 65 | + python-version: ${{ matrix.python-version }} |
| 66 | + architecture: 'x64' |
| 67 | + - name: Install dependencies |
| 68 | + run: | |
| 69 | + python -m pip install --progress-bar off --upgrade pip setuptools |
| 70 | + python -m pip install --progress-bar off .[test] |
| 71 | + python -m pip install matplotlib |
| 72 | + python -m pip install --progress-bar off --upgrade --no-deps --pre --only-binary :all: -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple --timeout=180 matplotlib |
| 73 | + python -m pip install --progress-bar off --upgrade --pre --only-binary :all: -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple --timeout=180 numpy scipy |
| 74 | + python -m pip uninstall -y nilearn |
| 75 | + - name: Run pytest |
| 76 | + run: pytest nigsp --cov=nigsp --cov-report=xml --cov-config=setup.cfg |
| 77 | + - name: Upload to codecov |
| 78 | + uses: codecov/codecov-action@v4 |
| 79 | + with: |
| 80 | + files: ./coverage.xml |
| 81 | + flags: unittests # optional |
| 82 | + name: codecov-umbrella # optional |
| 83 | + token: ${{ secrets.CODECOV_TOKEN }} |
| 84 | + verbose: true # optional (default = false) |
0 commit comments