テストケースの修正(evals/metrics) #107
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: ci | |
on: | |
push: | |
branches: [ "main", "dev" ] | |
pull_request: | |
branches: [ "main", "dev" ] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Lint with ruff | |
uses: chartboost/ruff-action@v1 | |
type-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
cache: "pip" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install mypy mypy-gh-action-report | |
pip install .[all] | |
- name: Static type check with mypy | |
run: | | |
mypy . | mypy-gh-action-report | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
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 }} | |
cache: "pip" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install pytest pytest-cov pytest-github-actions-annotate-failures | |
pip install .[dev] | |
# https://stackoverflow.com/questions/985876/tee-and-exit-status | |
- name: Test with pytest | |
run: | | |
( | |
set -o pipefail | |
pytest --junitxml=pytest.yml \ | |
--cov-report=term-missing:skip-covered --cov=bdpy tests | tee pytest-coverage.txt | |
) | |
- name: Upload coverage comment | |
if: always() | |
uses: MishaKav/pytest-coverage-comment@v1.1.47 | |
with: | |
pytest-coverage-path: pytest-coverage.txt | |
junitxml-path: pytest.yml |