From d8cb63faf347c5f57a0c3e03e542badfc3f1944d Mon Sep 17 00:00:00 2001 From: Aleksandr Date: Fri, 15 Nov 2024 09:46:46 +0300 Subject: [PATCH] Add ci GitHub Action --- .github/workflows/ci.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..51c8996 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,31 @@ +name: otus-scoring-api +on: + push: + +jobs: + ci: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: setup python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + - name: install poetry + uses: snok/install-poetry@v1 + with: + version: 1.8.3 + virtualenvs-create: true + virtualenvs-in-project: true + - name: install dependencies + run: poetry install + - name: run linter + run: poetry run ruff check + - name: run formatter + run: poetry run black . + - name: check import sorting + run: poetry run isort . + - name: run domain tests + run: poetry run python -m unittest ./tests/test_domain/test_services.py + - name: run infrastructure tests + run: poetry run python -m unittest ./tests/test_infrastructure/test_orm.py