|
| 1 | +name: 'Tests' |
| 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 | + push: |
| 7 | + branches: ["master", "maint/*"] |
| 8 | + pull_request: |
| 9 | + branches: ["master", "maint/*"] |
| 10 | + |
| 11 | +permissions: |
| 12 | + contents: read |
| 13 | + |
| 14 | +jobs: |
| 15 | + pytest: |
| 16 | + name: '${{ matrix.os }} / ${{ matrix.python }}' |
| 17 | + timeout-minutes: 70 |
| 18 | + runs-on: ${{ matrix.os }} |
| 19 | + defaults: |
| 20 | + run: |
| 21 | + shell: bash -el {0} |
| 22 | + env: |
| 23 | + MNE_HCP_N_RUNS: '3' |
| 24 | + SUBJECTS_DIR: '${{ github.workspace }}/subjects' |
| 25 | + MNE_LOGGING_LEVEL: warning |
| 26 | + strategy: |
| 27 | + matrix: |
| 28 | + include: |
| 29 | + - os: ubuntu-latest |
| 30 | + python: '3.8' # TODO: Bump to 3.12 |
| 31 | + # - os: macos-latest # arm64 (Apple Silicon) |
| 32 | + # python: '3.12' |
| 33 | + # kind: mamba |
| 34 | + # - os: macos-13 # latest Intel release |
| 35 | + # python: '3.12' |
| 36 | + # kind: mamba |
| 37 | + # - os: windows-latest |
| 38 | + # python: '3.12' |
| 39 | + # - os: ubuntu-20.04 |
| 40 | + # python: '3.8' |
| 41 | + fail-fast: false |
| 42 | + steps: |
| 43 | + - uses: actions/checkout@v4 |
| 44 | + with: |
| 45 | + fetch-depth: 0 |
| 46 | + - uses: actions/setup-python@v5 |
| 47 | + with: |
| 48 | + python-version: ${{ matrix.python }} |
| 49 | + - uses: pyvista/setup-headless-display-action@main |
| 50 | + with: |
| 51 | + qt: true |
| 52 | + pyvista: false |
| 53 | + - run: pip install --upgrade pip setuptools |
| 54 | + # TODO: Relax this pin |
| 55 | + # TODO: Remove nose dependency |
| 56 | + - run: pip install -ve . s3cmd mne scikit-learn nose pytest pytest-cov "mne<0.24" nibabel |
| 57 | + - run: openssl aes-256-cbc -K "${{ secrets.encrypted_73bd2a498087_key }}" -iv "${{ secrets.encrypted_73bd2a498087_iv }}" -in .s3cfg.enc -out ~/.s3cfg -d |
| 58 | + - run: python -c "from pathlib import Path; assert (Path('~').expanduser() / '.s3cfg').is_file()" |
| 59 | + - run: mkdir ~/mne-hcp-data |
| 60 | + - run: s3cmd get s3://mne-hcp-testing-data/mne-hcp-testing.tar.gz ~/mne-hcp-data/ |
| 61 | + - run: cd ~/mne-hcp-data/ && tar -xvzf mne-hcp-testing.tar.gz |
| 62 | + - run: find ~/mne-hcp-data/mne-hcp-testing/105923 -name "*" > output.txt && cat output.txt | wc -l && head output.txt |
| 63 | + - run: mkdir -p "${{ env.SUBJECTS_DIR}}" && python -c "import mne; mne.datasets.fetch_fsaverage(subjects_dir='${{ env.subjects_dir }}')" |
| 64 | + - run: pytest -rfEXs --cov-report= --tb=short --durations 30 -v --cov=mne --cov-report xml hcp |
| 65 | + - uses: codecov/codecov-action@v4 |
| 66 | + with: |
| 67 | + token: ${{ secrets.CODECOV_TOKEN }} |
| 68 | + if: success() |
0 commit comments