From 716638752b9a74d46a79d4befc0806389e103197 Mon Sep 17 00:00:00 2001 From: Waket Zheng Date: Sat, 1 Jun 2024 20:46:08 +0800 Subject: [PATCH 1/2] Update ci action versions and avoid `make ci` install deps twice --- .github/workflows/ci.yml | 4 ++-- .github/workflows/pypi.yml | 4 ++-- Makefile | 11 +++++++---- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bdcda53..e8d441d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,8 +21,8 @@ jobs: steps: - name: Start MySQL run: sudo systemctl start mysql.service - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: '3.x' - name: Install and configure Poetry diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index c07d631..56e570d 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -7,8 +7,8 @@ jobs: publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: '3.x' - name: Install and configure Poetry diff --git a/Makefile b/Makefile index 85fffc2..1775a2d 100644 --- a/Makefile +++ b/Makefile @@ -14,13 +14,15 @@ up: deps: @poetry install -E asyncpg -E asyncmy -style: deps +_style: @isort -src $(checkfiles) @black $(black_opts) $(checkfiles) +style: deps _style -check: deps +_check: @black --check $(black_opts) $(checkfiles) || (echo "Please run 'make style' to auto-fix style issues" && false) @ruff $(checkfiles) +check: deps _check test: deps $(py_warn) TEST_DB=sqlite://:memory: py.test @@ -34,9 +36,10 @@ test_mysql: test_postgres: $(py_warn) TEST_DB="postgres://postgres:$(POSTGRES_PASS)@$(POSTGRES_HOST):$(POSTGRES_PORT)/test_\{\}" pytest -vv -s -testall: deps test_sqlite test_postgres test_mysql +_testall: test_sqlite test_postgres test_mysql +testall: deps _test_all build: deps @poetry build -ci: check testall +ci: check _testall From aee706e29be30a02cc82c3ff02252118f51cd586 Mon Sep 17 00:00:00 2001 From: Waket Zheng Date: Thu, 6 Jun 2024 16:43:08 +0800 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d988fbb..af71317 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ **Upgrade note:** 1. Use column name as unique key name for mysql + 2. Drop support for Python3.7 ## 0.7