Skip to content

Commit bc5385e

Browse files
committed
Clean up and migrate to GHA
Signed-off-by: Arcadiy Ivanov <arcadiy@ivanov.biz>
1 parent 809e558 commit bc5385e

File tree

8 files changed

+62
-151
lines changed

8 files changed

+62
-151
lines changed

.github/workflows/build.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: fluent-logger
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- master
7+
jobs:
8+
build-stable:
9+
runs-on: ${{ matrix.os }}
10+
continue-on-error: false
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
os:
15+
- ubuntu-latest
16+
- windows-latest
17+
- macosx-latest
18+
python-version:
19+
- '3.10'
20+
- '3.9'
21+
- '3.8'
22+
- '3.7'
23+
- '3.6'
24+
- 'pypy-3.7'
25+
env:
26+
DEPLOY_PYTHONS: "3.9"
27+
DEPLOY_OSES: "Linux"
28+
TWINE_USERNAME: __token__
29+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
steps:
32+
- shell: bash
33+
if: |
34+
github.event_name == 'push' &&
35+
contains(env.DEPLOY_OSES, runner.os) &&
36+
contains(env.DEPLOY_PYTHONS, matrix.python-version)
37+
run: |
38+
echo "PYB_EXTRA_ARGS=+upload" >> $GITHUB_ENV
39+
- uses: pybuilder/build@master
40+
with:
41+
python-version: ${{ matrix.python-version }}
42+
pyb-extra-args: ${{ env.PYB_EXTRA_ARGS }}
43+
build-stable-summary:
44+
if: success() || failure()
45+
runs-on: ubuntu-latest
46+
name: Build Stable Summary
47+
needs: build-stable
48+
steps:
49+
- name: Check build matrix status
50+
if: needs.build-stable.result != 'success'
51+
run: exit 1

.travis.yml

-32
This file was deleted.

build.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@
3232

3333
@init
3434
def set_properties(project):
35-
project.build_depends_on("docker", "~=4.2.0")
36-
project.build_depends_on("cryptography", "~=2.9.0")
35+
project.build_depends_on("docker", ">=5.0")
36+
project.build_depends_on("cryptography", ">=2.9.0")
3737

3838
project.set_property("verbose", True)
3939

40-
project.set_property("coverage_break_build", True)
40+
project.set_property("coverage_break_build", False)
4141
project.get_property("coverage_exceptions").extend(["setup"])
4242

4343
project.set_property("flake8_break_build", True)

src/main/python/fluent/sender.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from urllib.parse import urlparse
1717
from uuid import uuid1
1818

19-
from msgpack import Unpacker, Packer
19+
from msgpack import Packer
2020
from msgpack.fallback import Unpacker
2121

2222
DEFAULT_SCHEME = "tcp"
@@ -37,6 +37,7 @@
3737

3838
_endpoint_registry = {}
3939

40+
4041
def to_bytes(s):
4142
if isinstance(s, str):
4243
return s.encode("utf-8")
@@ -886,7 +887,7 @@ def run(self):
886887
r_int.add(wakeup_sock_r)
887888

888889
op_queue = self.op_queue
889-
last_ts = time.time()
890+
# last_ts = time.time()
890891

891892
with wakeup_sock_r, self.wakeup_sock_w:
892893
while r_int or w_int:
@@ -909,7 +910,7 @@ def run(self):
909910
r_int.remove(r)
910911
break
911912
elif cmd == NEW_OP:
912-
enable, op, conn = op_queue.pop() # type: EndpointOp
913+
enable, op, conn = op_queue.pop()
913914
if op == OP_READ:
914915
if enable:
915916
r_int.add(conn)

src/unittest/python/fluentd_tester.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import os
22
import tempfile
33
from collections import namedtuple
4+
45
import docker
56

67
"""
@@ -32,7 +33,8 @@ def __init__(self, config, *, port_generator, docker, data_dir):
3233
self.data_dir = data_dir
3334

3435
def start(self):
35-
36+
pass
37+
3638
def cleanup(self):
3739
self.config_dir.cleanup()
3840
if self.config.proto.startswith("unix"):
@@ -59,7 +61,7 @@ def port_generator():
5961
data_dir=self.data_dir)
6062

6163
def setUp(self):
62-
64+
pass
6365

6466
def tearDown(self):
6567
for config in self.instances:

travis/travis_install.cmd

-17
This file was deleted.

travis/travis_install.sh

-33
This file was deleted.

travis/travis_shim.py

-61
This file was deleted.

0 commit comments

Comments
 (0)