From 3d4d19f2ba1f876942a061393e36f6915ddcce6d Mon Sep 17 00:00:00 2001 From: Michael Kryukov Date: Thu, 12 Sep 2024 22:51:53 +0300 Subject: [PATCH] refactor: simplified Makefile; used other way to install poetry --- .github/workflows/check.yml | 5 +---- .github/workflows/deploy.yml | 2 +- Makefile | 12 ++++++------ 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index a56fc68..d5ada7d 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -16,9 +16,6 @@ jobs: matrix: os: [windows-latest, ubuntu-latest] python-version: ["3.8", "3.10", "3.12"] - defaults: - run: - shell: bash steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} @@ -26,7 +23,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Install Poetry - uses: snok/install-poetry@v1 + uses: abatilo/actions-poetry@v2 - name: Install dependencies run: poetry install --no-interaction - name: Lint with ruff and test with pytest diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index fd20f69..12311cb 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -18,7 +18,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Install Poetry - uses: snok/install-poetry@v1 + uses: abatilo/actions-poetry@v2 - name: Install dependencies run: poetry install --no-interaction - name: Test with coverage and pytest diff --git a/Makefile b/Makefile index 9d9300d..fe08158 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,14 @@ -.PHONY: all +.PHONY: all check format test all: check test check: - poetry run python -m ruff check mongomock_motor/ tests/ && \ - poetry run python -m ruff format --check mongomock_motor/ tests/ + poetry run ruff check mongomock_motor tests && \ + poetry run ruff format --check mongomock_motor tests format: - poetry run python -m ruff check --fix mongomock_motor/ tests/ && \ - poetry run python -m ruff format mongomock_motor/ tests/ + poetry run ruff check --fix mongomock_motor tests && \ + poetry run ruff format mongomock_motor tests test: - poetry run python -m pytest tests/ + poetry run pytest tests