Skip to content

fix: fix action

fix: fix action #208

Workflow file for this run

# Runs multi-platform testing with poetry
# Based on https://github.com/marketplace/actions/install-poetry-action
name: Tests
on:
push:
branches:
- main
paths-ignore:
- README.md
- CHANGELOG.md
- .gitignore
- examples/**
- docker/**
- images/**
pull_request:
branches:
- main
jobs:
tests:
strategy:
fail-fast: true
matrix:
# python-version: ["3.7", "3.8", "3.9"]
python-version: ["3.9"]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: setup-python
id: setup-python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: latest
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --all-extras
- name: Run tests
run: |
source .venv/bin/activate
poetry run pytest --cov cellseg_models_pytorch/ --cov-report xml
- name: Upload coverage
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
fail_ci_if_error: true
verbose: true