Skip to content

Commit

Permalink
Preliminary SQLAlchemy 2.0 support (#14)
Browse files Browse the repository at this point in the history
* SQLAlchemy 2.0 support.

* Makefile updates.

* Bump version: 0.6.4 → 0.7.0.

* Added way to run Docker tests manually (to test compatiblity with PostgreSQL).

* Tweak CI/CD test pipeline.
  • Loading branch information
flipbit03 committed Apr 10, 2023
1 parent bc572e4 commit 69ee141
Show file tree
Hide file tree
Showing 9 changed files with 491 additions and 416 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.6.4
current_version = 0.7.1
commit = True
tag = False

Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/build.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
name: Build
name: Tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
branches: [ main, "*" ]
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-20.04
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Build Docker image
run: |
Expand Down
21 changes: 20 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
sources = sqlalchemy_easy_softdelete

.PHONY: lint test coverage clean
.PHONY: lint test docker_test coverage clean dev pg bump_patch bump_minor bump_major

lint:
pre-commit run --all-files

test:
pytest

docker_test: clean
docker compose build tests-with-coverage
docker compose --env-file .env.docker run tests

coverage:
pytest --cov=$(sources) --cov-branch --cov-report=term-missing --cov-report=xml tests

Expand All @@ -15,10 +20,24 @@ clean:
rm -rf *.egg-info
rm -rf .tox dist site
rm -rf coverage.xml .coverage
docker compose down -v

dev:
poetry install -E dev -E test


pg:
# Start Postgres Instance
docker compose up -d pg

# 0.0.X
bump_patch:
bump2version patch --no-tag

# 0.X.0
bump_minor:
bump2version minor --no-tag

# X.0.0
bump_major:
bump2version major --no-tag
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![pypi](https://img.shields.io/pypi/v/sqlalchemy-easy-softdelete.svg)](https://pypi.org/project/sqlalchemy-easy-softdelete/)
[![python](https://img.shields.io/pypi/pyversions/sqlalchemy-easy-softdelete.svg)](https://pypi.org/project/sqlalchemy-easy-softdelete/)
[![Build Status](https://github.com/flipbit03/sqlalchemy-easy-softdelete/actions/workflows/build.yml/badge.svg)](https://github.com/flipbit03/sqlalchemy-easy-softdelete/actions/workflows/build.yml)
[![Build Status](https://github.com/flipbit03/sqlalchemy-easy-softdelete/actions/workflows/test.yml/badge.svg)](https://github.com/flipbit03/sqlalchemy-easy-softdelete/actions/workflows/test.yml)

[//]: # ([![codecov](https://codecov.io/gh/flipbit03/sqlalchemy-easy-softdelete/branch/main/graphs/badge.svg)](https://codecov.io/github/flipbit03/sqlalchemy-easy-softdelete))

Expand Down
Loading

0 comments on commit 69ee141

Please sign in to comment.