Skip to content

Commit

Permalink
Add circleci config and change the name of the package to avoid clashing
Browse files Browse the repository at this point in the history
  • Loading branch information
srxavi committed Jul 5, 2024
1 parent 8e02237 commit c14a93d
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 2 deletions.
52 changes: 52 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
version: 2.1

orbs:
python: circleci/[email protected]
common: travelperk/[email protected]

workflows:
main:
jobs:
- test:
context: [aws, codeartifact]
- publish:
context: [aws, codeartifact]
requires:
- test
filters:
branches:
only:
- main

jobs:
test:
resource_class: small
docker:
- image: $AWS_ECR_ACCOUNT_URL_US/tk-python:v6.5-3.11.7
- name: postgres
image: postgres:14.10
command: -c fsync=off -c full_page_writes=off -c shared_buffers=1024MB -c autovacuum=off -c max_connections=200 -c max_locks_per_transaction=128
environment:
POSTGRES_PASSWORD: postgres
environment:
TEST_DB_HOST: localhost
TEST_DB_USER: postgres
TEST_DB_PASS: postgres
TEST_DB_NAME: postgres
steps:
- checkout
- run:
name: Install dependencies
command: "pip install Django==4.2 && pip install tox==4.14.2"
- run:
name: Run tests
command: tox -e django-4.2

publish:
resource_class: small
docker:
- image: $AWS_ECR_ACCOUNT_URL_US/tk-python-ci:v6.5-3.11.7
steps:
- checkout
- run: python setup.py sdist bdist_wheel
- run: twine upload dist/* --skip-existing
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


setup(
name="django-auditlog",
name="tk-django-auditlog",
use_scm_version={"version_scheme": "post-release"},
setup_requires=["setuptools_scm"],
packages=[
Expand Down
4 changes: 3 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
envlist =
{py36,py37,py38,py39}-django-{22,31,32}
{py36,py37,py38,py39,py311}-django-{22,31,32,42}
py38-docs
py38-qa

Expand All @@ -12,6 +12,7 @@ deps =
django-22: Django>=2.2,<2.3
django-31: Django>=3.1,<3.2
django-32: Django>=3.2,<3.3
django-42: Django>=4.2,<4.3
# Test requirements
coverage
codecov
Expand All @@ -28,6 +29,7 @@ basepython =
py38: python3.8
py37: python3.7
py36: python3.6
py311: python3.11

[testenv:py38-docs]
changedir = docs/source
Expand Down

0 comments on commit c14a93d

Please sign in to comment.