Add pre commit (#26) #3
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: Run test_game.py | |
| on: [push] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Debug directory structure | |
| run: | | |
| # ✅ Show actual directory structure | |
| echo "Current directory: $(pwd)" | |
| ls -la | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.10" | |
| - name: Install dependencies | |
| run: | | |
| cd games/game_werewolves | |
| pip install pytest pytest-asyncio | |
| pip install -r requirements.txt | |
| - name: Run game_test.py | |
| env: | |
| DASHSCOPE_API_KEY: ${{ secrets.DASHSCOPE_API_KEY }} | |
| PYTHONPATH: $GITHUB_WORKSPACE/games/game_werewolves | |
| run: | | |
| # ✅ Ensure correct working directory | |
| PYTHONPATH=$GITHUB_WORKSPACE/games/game_werewolves python -m pytest tests/game_test.py -v |