Update test_fizzbuzz.py #9
This file contains hidden or 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: Python Test | |
| on: [push, pull_request] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pytest | |
| - name: 🔍 テストファイルの一覧を表示 | |
| run: | | |
| ls -la ./test_*.py | |
| - name: 🚀 テストの実行とレポート生成 | |
| run: | | |
| # ファイル名を直接指定せず、pytestの自動検出に任せる形にしています | |
| pytest --junitxml='test-report.xml' | |
| - name: 📤 テストレポートを成果物として保存 | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: python-test-report | |
| path: test-report.xml |