Skip to content

Merge pull request #724 from int-brain-lab/iblrigv8dev #1502

Merge pull request #724 from int-brain-lab/iblrigv8dev

Merge pull request #724 from int-brain-lab/iblrigv8dev #1502

Workflow file for this run

name: CI
on:
workflow_dispatch:
push:
branches: [iblrigv8]
paths-ignore:
- 'docs/**'
pull_request:
paths-ignore:
- 'docs/**'
jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
name: ruff check
with:
args: 'check --output-format=github'
- uses: chartboost/ruff-action@v1
name: ruff format
with:
args: 'format --check'
tests:
name: build (${{ matrix.python-version }}, ${{ matrix.os }})
needs: ruff
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest"]
python-version: ["3.10"]
steps:
- name: Checkout iblrig repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: ${{ matrix.python-version }}
cache: true
- name: Install requirements
run: pdm sync -G project-extraction -dG test -dG ci
- name: Install audio library (Ubuntu only)
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install -y libportaudio2
- name: iblrig unit tests
run: pdm run pytest
- name: coveralls.io
uses: coverallsapp/github-action@v2
with:
flag-name: ${{ matrix.python-version }}, ${{ matrix.os }}
parallel: true
file: coverage.xml
compare-ref: iblrigv8
- name: Generate requirements_frozen.txt
run: pdm export -o requirements_frozen.txt --no-hashes
- name: Store frozen requirements as artifacts
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: requirements_frozen
path: requirements_frozen.txt
finish:
needs: [ruff, tests]
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true