Skip to content

update

update #14

Workflow file for this run

name: Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '0 0 * * *' # Daily at midnight UTC
defaults:
run:
shell: bash
jobs:
test:
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.8', '3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.5.1
virtualenvs-create: true
virtualenvs-in-project: true
- name: Install dependencies
run: |
poetry install --with dev,test --no-interaction --no-ansi
- name: Run tests with coverage
run: |
poetry run pytest --cov=dialogchain --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
fail_ci_if_error: false
- name: Run type checking
run: |
poetry run mypy src/dialogchain tests
- name: Lint with flake8
run: |
poetry run flake8 src/dialogchain tests
- name: Check formatting with black
run: |
poetry run black --check src tests
- name: Check import sorting with isort
run: |
poetry run isort --check-only src tests