diff --git a/.github/workflows/backend_ci.yml b/.github/workflows/backend_ci.yml new file mode 100644 index 0000000..a9b1fe7 --- /dev/null +++ b/.github/workflows/backend_ci.yml @@ -0,0 +1,36 @@ +name: Python Package build test + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + +jobs: + build-linux: + runs-on: ubuntu-latest + strategy: + max-parallel: 5 + + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.12 + uses: actions/setup-python@v3 + with: + python-version: '3.12.0' + - name: Install poerty + uses: abatilo/actions-poetry@v2 + with: + poetry-version: '1.6.1' + - name: Install dependencies by poerty + run: | + cd backend + poetry install + - name: Run linter by ruff + run: | + cd backend + poetry run ruff check -v app + - name: Run test by pytest + run: | + cd backend + poetry run pytest -v tests diff --git a/backend/README.md b/backend/README.md index b8e3b8f..932600f 100644 --- a/backend/README.md +++ b/backend/README.md @@ -29,7 +29,7 @@ curl --request POST --http2 \ ### Test ```bash -poetry run pytest -v ./tests/e2e/game.py +poetry run pytest -v ./tests/e2e/test_game.py ``` ### Linter diff --git a/backend/tests/e2e/game.py b/backend/tests/e2e/test_game.py similarity index 100% rename from backend/tests/e2e/game.py rename to backend/tests/e2e/test_game.py