Skip to content

Commit

Permalink
Merge pull request #240 from apocelipes/feat-upgrade-dependencies
Browse files Browse the repository at this point in the history
feat: upgrade dependencies to support python 3.10+
  • Loading branch information
fenngwd authored Oct 26, 2022
2 parents 23b6700 + 075f071 commit 6c60a91
Show file tree
Hide file tree
Showing 9 changed files with 114 additions and 38 deletions.
1 change: 1 addition & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ omit =
*.tmpl
versioneer.py
*/_version.py
relative_files = True

[report]
exclude_lines =
Expand Down
71 changes: 71 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: CI

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
- run: pip install -r test-requirements.txt -U
- name: Run git-lint
run: gitlint --commits "8d1d969b..HEAD"
- name: Run python code lint
run: flake8 sea --exclude=*_pb2.py

tests:
name: "Python ${{ matrix.py-version }} unit-tests"
needs: lint
runs-on: ubuntu-latest
strategy:
matrix:
py-version: ['3.7', '3.8', '3.9', '3.10']
services:
redis-server:
image: redis
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.py-version }}
cache: 'pip'
- run: pip install -r test-requirements.txt -U
- name: Run test_celery_no_app
run: pytest tests/test_contrib/test_extensions/test_celery.py::test_celery_no_app --cov-fail-under=10
- name: Run unit-tests
run: pytest tests --cov sea
- name: Coveralls Parallel
uses: AndreMiras/coveralls-python-action@develop
with:
flag-name: "Integration Test - ${{ matrix.py-version }}"
parallel: true

report_coverage:
name: Report testing coverage
needs: tests
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: AndreMiras/coveralls-python-action@develop
with:
parallel-finished: true
28 changes: 28 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Upload Python Package

on:
release:
types: [published]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install -U pip setuptools
pip install wheel
- name: Build package
run: python setup.py bdist_wheel
- name: Publish a Python distribution to PyPI
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repos:
hooks:
- id: isort
- repo: "https://github.com/ambv/black"
rev: 22.3.0
rev: 22.8.0
hooks:
- id: black
language_version: python3
Expand Down
31 changes: 0 additions & 31 deletions .travis.yml

This file was deleted.

6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# CHANGELOG

## [Unreleased] - 2022-10-25

### Changed
- Upgrade depebdebcies to support python 3.10+
- Changed CI from Travis CI to Github Actions

## [3.0.0] - 2022-06-24

### Added
Expand Down
2 changes: 1 addition & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[pytest]
addopts = --strict -vvl --cov=sea --cov-report=term-missing --cov-fail-under=85
addopts = --strict-markers -vvl --cov=sea --cov-report=term-missing --cov-fail-under=85
5 changes: 3 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
grpcio>=1.27.0,<1.44.0
grpcio-tools>=1.27.0,<1.44.0
grpcio>=1.27.0,<1.49.0
grpcio-tools>=1.27.0,<1.49.0
protobuf<4.0.0
pendulum
blinker
jinja2
6 changes: 3 additions & 3 deletions test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ peeweext
cachext
redis
celery
pytest
pytest-cov
pytest>7.0.0
pytest-cov>=4.0.0
flake8
coveralls
codeclimate-test-reporter
coverage>=4.0,<6.4
coverage>=4.0,<6.6
prometheus_client
versioneer
pre-commit
Expand Down

0 comments on commit 6c60a91

Please sign in to comment.