Skip to content

Commit

Permalink
Merge branch 'aliyun:master' into master_parse_timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
Miaodric authored Aug 16, 2024
2 parents 355fffe + 9552eef commit 2eebef0
Show file tree
Hide file tree
Showing 15 changed files with 783 additions and 11 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Py3-build-test

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
test:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.12]

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -V
python -m pip install --upgrade pip setuptools
python -m pip install .
- name: Show dependencies
run: |
python -m pip freeze
- name: Run build tests
run: |
python -m pip install pytest
python -m pytest tests/ci/build-test/
35 changes: 35 additions & 0 deletions .github/workflows/py2-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@


name: Py2-build-test

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
test:
runs-on: ubuntu-20.04
container:
image: python:2.7.18-buster

steps:
- name: Checkout repository
uses: actions/checkout@v2


- name: Install dependencies
run: |
python -V
python -m pip install --upgrade pip setuptools
python -m pip install .
- name: Show dependencies
run: |
python -m pip freeze
- name: Run build tests
run: |
python -m pip install pytest
python -m pytest tests/ci/build-test/
2 changes: 1 addition & 1 deletion aliyun/log/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from .shipper_response import *
from .common_response import *
from .external_store_config_response import *
from .log_logs_raw_pb2 import LogGroupRaw as LogGroup
from .proto import LogGroupRaw as LogGroup

# logging handler
from .logger_hanlder import SimpleLogHandler, QueuedLogHandler, LogFields, UwsgiQueuedLogHandler
9 changes: 9 additions & 0 deletions aliyun/log/_proto_py2/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import sys

MAX_PYTHON_VERSION = (3, 0)

if sys.version_info >= MAX_PYTHON_VERSION:
raise RuntimeError("This module works only on Python 2, "
"You are using Python {}.{}.{}".format(sys.version_info.major,
sys.version_info.minor,
sys.version_info.micro))
297 changes: 297 additions & 0 deletions aliyun/log/_proto_py2/log_logs_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2eebef0

Please sign in to comment.