Skip to content

Updating nhcommons dependencies #81

Updating nhcommons dependencies

Updating nhcommons dependencies #81

Workflow file for this run

# Workflow for running plugins lambda tests for PRs and main branch
name: Plugins Tests
on:
push:
branches:
- main
paths:
- 'plugins/**'
- 'napari-hub-commons/**'
- '.github/workflows/plugins-tests.yml'
pull_request:
branches:
- '**'
paths:
- 'plugins/**'
- 'napari-hub-commons/**'
- '.github/workflows/plugins-tests.yml'
defaults:
run:
working-directory: plugins/
jobs:
# Runs pytest for backend code
tests:
name: Unit test with pytest
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: "3.9"
- name: Cache Python environment
uses: actions/cache@v3
id: pip-cache
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('dev-requirements.txt') }}
- name: Install dependencies
# installs libffi7 since Ubuntu >=20.10 comes with libff8
run: |
sudo apt install libffi7
pip install --upgrade pip
pip install -r requirements.txt
pip install -r test-requirements.txt
- name: Run tests
working-directory: plugins/
run : |
python -m pytest .
lints:
name: Linting with Black
runs-on: ubuntu-20.04
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: "3.9"
- uses: psf/black@stable
with:
options: "--check --diff --color --verbose"
version: "~= 23.1.0"
src: "./plugins"