Skip to content

Commit

Permalink
improve workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
mscheltienne committed Dec 2, 2024
1 parent ab72a16 commit 16df8cb
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 96 deletions.
31 changes: 0 additions & 31 deletions .github/actions/install-liblsl/action.yaml

This file was deleted.

46 changes: 14 additions & 32 deletions .github/workflows/doc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,24 @@ jobs:
build:
timeout-minutes: 10
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install liblsl
uses: ./.github/actions/install-liblsl
- name: Create virtual sound card
uses: ./.github/actions/create-soundcard
- name: Setup Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install linux dependencies
run: |
sudo apt update
sudo apt install -y optipng
- name: Install uv and package
run: |
python -m pip install --quiet uv
uv pip install --quiet --system .[doc]
- name: Display system information
run: stimuli sys-info --developer
- name: Build doc
run: make -C doc html
- uses: actions/checkout@v4
- uses: ./.github/actions/create-soundcard
- uses: pyvista/setup-headless-display-action@v3
- uses: actions/setup-python@v5
with:
python-version: 3.11
- uses: astral-sh/setup-uv@v4
- run: uv pip install --quiet --system .[doc]
- run: stimuli sys-info --developer
- run: make -C doc html
- name: Prune sphinx environment
run: rm -R ./doc/_build/html/.doctrees
- name: Upload documentation
uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v4
with:
name: doc-dev
path: ./doc/_build/html
Expand All @@ -53,19 +41,13 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
defaults:
run:
shell: bash
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download documentation
uses: actions/download-artifact@v4
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: doc-dev
path: ./doc-dev
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
- uses: JamesIves/github-pages-deploy-action@v4
with:
folder: ./doc-dev
target-folder: .
Expand Down
21 changes: 7 additions & 14 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,15 @@ jobs:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install liblsl
uses: ./.github/actions/install-liblsl
- name: Create virtual sound card
uses: ./.github/actions/create-soundcard
- name: Setup Python 3.11
uses: actions/setup-python@v5
- uses: actions/checkout@v4
- uses: ./.github/actions/create-soundcard
- uses: pyvista/setup-headless-display-action@v3
- uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install uv and package
run: |
python -m pip install --quiet uv
uv pip install --quiet --system .[build]
- name: Display system information
run: stimuli sys-info --developer
- uses: astral-sh/setup-uv@v4
- run: uv pip install --quiet --system .[build]
- run: stimuli sys-info --developer
- name: Build and publish
env:
TWINE_USERNAME: __token__
Expand Down
27 changes: 9 additions & 18 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,17 @@ jobs:
run:
shell: bash
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install liblsl
uses: ./.github/actions/install-liblsl
- name: Create virtual sound card
uses: ./.github/actions/create-soundcard
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
- uses: actions/checkout@v4
- uses: ./.github/actions/create-soundcard
- uses: pyvista/setup-headless-display-action@v3
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv and package
run: |
python -m pip install --quiet uv
uv pip install --quiet --system .[test]
- name: Display system information
run: stimuli sys-info --developer
- name: Run pytest
run: pytest stimuli --cov=stimuli --cov-report=xml --cov-config=pyproject.toml
- name: Upload to codecov
uses: codecov/codecov-action@v5
- uses: astral-sh/setup-uv@v4
- run: uv pip install --quiet --system .[test]
- run: stimuli sys-info --developer
- run: pytest stimuli --cov=stimuli --cov-report=xml --cov-config=pyproject.toml
- uses: codecov/codecov-action@v5
with:
files: ./coverage.xml
flags: unittests # optional
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ full = [
'stimuli[all]',
]
lsl = [
'mne_lsl>=1.5.0',
'mne_lsl>=1.8.0',
]
pport = [
'pyparallel; sys_platform == "linux"',
Expand Down

0 comments on commit 16df8cb

Please sign in to comment.