diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..be41a45 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,19 @@ +name: Lint + +on: [push] + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v6 + + - uses: actions/setup-python@v6 + with: + python-version: "3.10" + cache: 'pip' + cache-dependency-path: setup.py + + - run: pip3 install -e '.[test]' + - run: make lint diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 871263d..1f28c5c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,9 +18,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v6 with: python-version: '3.x' cache: 'pip' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index da2daf6..adb4a24 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,13 +7,14 @@ jobs: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: - python-version: [3.7, 3.8, 3.9] + python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14" ] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} cache: 'pip' diff --git a/.gitignore b/.gitignore index 0211f3a..ccadd9e 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ build .idea/ .python-version venv +.venv diff --git a/.mise.toml b/.mise.toml new file mode 100644 index 0000000..4522c87 --- /dev/null +++ b/.mise.toml @@ -0,0 +1,16 @@ +[env] +MISE_FETCH_REMOTE_VERSIONS_TIMEOUT = "30s" + +_.python.venv = { + path = ".venv", + create = true, +} + +[tools] +python = "3.9" + +[tasks.test] +run = 'make install test' + +[tasks.lint] +run = 'make install lint' diff --git a/Makefile b/Makefile index 8ea2abe..885bed5 100644 --- a/Makefile +++ b/Makefile @@ -2,8 +2,10 @@ install: pip install --edit .[test] test: + python -m unittest customerio/analytics/test/*.py -v + +lint: pylint --rcfile=.pylintrc --reports=y --exit-zero customerio/analytics flake8 --max-complexity=10 --statistics customerio/analytics || true - python -m unittest customerio/analytics/test/*.py -v -.PHONY: install test +.PHONY: install test lint diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..c9aa3cc --- /dev/null +++ b/requirements.txt @@ -0,0 +1,6 @@ +backoff==2.2.1 +monotonic==1.6 +mock==2.0.0 +pylint==3.3.3 +python-dateutil==2.8.2 +requests>=2.32.2 \ No newline at end of file diff --git a/setup.py b/setup.py index 143a9ab..7f7048b 100644 --- a/setup.py +++ b/setup.py @@ -56,5 +56,10 @@ "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", ], )