Skip to content

角度での比較にする #16

角度での比較にする

角度での比較にする #16

Workflow file for this run

name: pytest
on: [pull_request, push]
jobs:
pytest:
# 3.7.12はubuntu-22.04では対応していない
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
poetry-version: ["1.8.2"]
steps:
# checkout repository
- name: checkout
uses: actions/checkout@v2
# install python
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
# poetry install
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: ${{ matrix.poetry-version}}
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
# vertural env cache
- name: Cache Poetry cache
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: poetry-cache-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.poetry-version}}-workflow-${{ hashFiles('**/.github/workflows/auto_pytest.yml') }}
# cacheがヒットする場合はインストールをスキップする
- name: install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: |
poetry install
# pytestを実行する -> カバレッジもあわせてみる
# poetry run python -m pytest -v --cov=api --cov-report=term-missing
- name: Test with pytest
run: |
poetry run python -m pytest -v