【修正】DIのバグ修正 #37
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
name: Pytest on PR | |
"on": pull_request | |
jobs: | |
pytest: | |
name: Run tests with pytest | |
# 実行環境として `ubuntu-latest` を選択 | |
runs-on: ubuntu-latest | |
# 複数の Python のバージョンでテストするために `strategy.matrix` を設定 | |
strategy: | |
matrix: | |
python-version: ["3.10"] | |
steps: | |
# リポジトリをチェックアウト | |
# See: https://github.com/actions/checkout | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# Python のランタイムをセットアップ | |
# バージョンは `strategy.matrix` に並べたものを指定 | |
# See: https://github.com/actions/setup-python | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# Poetry をインストール | |
- name: Install Poetry | |
run: | | |
curl -sSL https://install.python-poetry.org | python3 - | |
# Poetry へのパスを通す | |
- name: Add path for Poetry | |
run: echo "$HOME/.poetry/bin" >> $GITHUB_PATH | |
# インストールした Poetry を使って必要な Python パッケージをインストール | |
- name: Install Dependencies | |
run: | | |
cd ./api | |
poetry install --no-interaction --no-root | |
# pytest を実行 | |
- name: Run Tests | |
run: | | |
cd ./api | |
poetry run pytest |