Skip to content

K collie/298 update docstrings #797

K collie/298 update docstrings

K collie/298 update docstrings #797

Workflow file for this run

# This workflow will install Python dependencies and run tests with a variety of Python versions
name: tests
on:
workflow_dispatch:
pull_request:
push:
paths:
- .github/workflows/tests.yml
- indica/**
- tests/**
- poetry.lock
branches:
- master
- develop
jobs:
tests:
strategy:
matrix:
# Won't bother running the other cases until I know the tests pass on my computer
python-version: [3.8] #, 3.9]
os: [ubuntu-latest] #, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: abatilo/[email protected]
with:
poetry-version: 1.4.2
- name: Configure poetry
shell: bash
run: python -m poetry config virtualenvs.in-project true
- name: Set up cache
uses: actions/cache@v2
id: cache
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
- name: Ensure cache is healthy
if: steps.cache.outputs.cache-hit == 'true'
shell: bash
run: timeout 10s python -m poetry run pip --version || rm -rf .venv
- name: Install dependencies
shell: bash
run: python -m poetry install
- name: Test with pytest
run: |
poetry run pytest -n auto --hypothesis-profile CI --cov-report=xml --cov=indica
- name: "Upload coverage to Codecov"
if: ${{ always() }}
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
fail_ci_if_error: true
verbose: true