Skip to content

[pre-commit.ci] pre-commit autoupdate #124

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #124

Workflow file for this run

name: tests
on:
push:
branches: ['*']
pull_request:
jobs:
build:
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11']
platform: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Get pip cache directory
id: pip-cache
run: echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
shell: bash
- name: Cache pip dependencies
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/pyproject.toml') }}
restore-keys: ${{ runner.os }}-${{ matrix.python-version }}-pip-
- name: Install dependencies
run: pip install .[dev]
- name: Type check with mypy
run: mypy tofea
- name: Test with pytest
run: pytest --cov tofea
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}