fix: specify only minimal version for dependencies #29
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [ "main" ] | |
paths: | |
- ".github/workflows/**" | |
- "nervous_sensors/**" | |
- "tests/**" | |
- "pyproject.toml" | |
- "poetry.lock" | |
- ".pre-commit-config.yaml" | |
pull_request: | |
branches: [ "main" ] | |
paths: | |
- ".github/workflows/**" | |
- "nervous_sensors/**" | |
- "tests/**" | |
- "pyproject.toml" | |
- "poetry.lock" | |
- ".pre-commit-config.yaml" | |
jobs: | |
Lint-Test: | |
strategy: | |
matrix: | |
os: [ ubuntu-latest ] | |
python-version: [ "3.11", "3.12" ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download and install liblsl | |
run: | | |
wget https://github.com/sccn/liblsl/releases/download/v1.16.2/liblsl-1.16.2-jammy_amd64.deb | |
sudo apt install ./liblsl-1.16.2-jammy_amd64.deb | |
- name: 🐍 Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: 🪶 Install poetry | |
uses: abatilo/actions-poetry@v2 | |
- name: 🪶 Set up virtualenv | |
run: | | |
poetry config virtualenvs.in-project true | |
- uses: actions/cache@v3 | |
name: 🪶 Cache the virtualenv | |
with: | |
path: ./.venv | |
key: venv-${{ hashFiles('poetry.lock') }} | |
- name: 📦+🔧 Install the dependencies with dev | |
run: | | |
poetry install --with dev | |
- name: 🧹 Lint with pre-commit | |
run: | | |
poetry run pre-commit run --all-files | |
- name: 🧪 Test with pytest | |
run: | | |
poetry run pytest |