Skip to content

Commit e25b226

Browse files
committed
MAINT: Update CIs
1 parent 7dc789f commit e25b226

File tree

4 files changed

+133
-0
lines changed

4 files changed

+133
-0
lines changed

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "monthly"
7+
groups:
8+
actions:
9+
patterns:
10+
- "*"

.github/release.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
changelog:
2+
exclude:
3+
authors:
4+
- dependabot
5+
- pre-commit-ci
6+
- github-actions

.github/workflows/release.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Upload a Python Package using Twine when a release is created
2+
3+
name: Build
4+
on: # yamllint disable-line rule:truthy
5+
release:
6+
types: [published]
7+
push:
8+
branches: ["main", "maint/*"]
9+
pull_request:
10+
branches: ["main", "maint/*"]
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
package:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: actions/setup-python@v5
21+
with:
22+
python-version: '3.10'
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install build twine
27+
- run: python -m build --sdist --wheel
28+
- run: twine check --strict dist/*
29+
- uses: actions/upload-artifact@v4
30+
with:
31+
name: dist
32+
path: dist
33+
34+
pypi-upload:
35+
needs: package
36+
runs-on: ubuntu-latest
37+
if: github.event_name == 'release'
38+
permissions:
39+
id-token: write # for trusted publishing
40+
environment:
41+
name: pypi
42+
url: https://pypi.org/p/mne
43+
steps:
44+
- uses: actions/download-artifact@v4
45+
with:
46+
name: dist
47+
path: dist
48+
- uses: pypa/gh-action-pypi-publish@release/v1
49+
if: github.event_name == 'release'

.github/workflows/tests.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
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

Comments
 (0)