添加 action

This commit is contained in:
洛水.山岭居室 2022-05-30 17:52:59 +08:00
parent 19cf972094
commit 8442ee56c4
2 changed files with 28 additions and 1 deletions

View File

@ -0,0 +1,27 @@
name: Run Python Tests
on:
push:
branches: [ dev ]
pull_request:
branches: [ dev ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests with pytest
run: |
python -m unittest test/service/test_game.py

View File

@ -34,4 +34,4 @@ class TestGame(IsolatedAsyncioTestCase):
if __name__ == "__main__":
unittest.main("TestGame")
unittest.main()