Skip to content

Commit

Permalink
Merge pull request #194 from jiangxin369/test-action
Browse files Browse the repository at this point in the history
CI Support
  • Loading branch information
wuchaochen1 authored Apr 23, 2021
2 parents 12cac6c + 08fca64 commit c965fdf
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 3 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/flink_ai_flow_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Flink AI Flow CI Build

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

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
pip install ./flink-ai-flow/lib/notification_service
pip install ./flink-ai-flow/lib/airflow
pip install ./flink-ai-flow
- name: Lint with flake8
run: |
# stop the build if there are Python syntax erroservice.pys or undefined names
flake8 flink-ai-flow --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 flink-ai-flow --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
/bin/bash flink-ai-flow/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@

from typing import Dict

from ai_flow.store.abstract_store import AbstractStore

from ai_flow.rest_endpoint.protobuf.high_availability_pb2 import ListMembersResponse, ReturnStatus, MemberProto, \
NotifyNewMemberResponse, NotifyNewMemberRequest
from ai_flow.rest_endpoint.protobuf.high_availability_pb2_grpc import HighAvailabilityManagerServicer, \
Expand Down Expand Up @@ -88,7 +86,7 @@ class SimpleAIFlowServerHaManager(AIFlowServerHaManager):

def __init__(self):
self.server_uri = None
self.storage = None # type: AbstractStore
self.storage = None
self.ttl_ms = None
self.living_members = []
self.member_connections = {} # type: Dict[str, HighAvailabilityManagerStub]
Expand Down
2 changes: 2 additions & 0 deletions flink-ai-flow/ai_flow/store/abstract_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
# under the License.
#
from abc import abstractmethod, ABCMeta

from ai_flow.rest_endpoint.service.high_availability import Member
from typing import Text, Union, List, Optional

from ai_flow.meta.metric_meta import MetricMeta, MetricSummary
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

from notification_service.base_notification import BaseEvent
from notification_service.event_storage import BaseEventStorage
from notification_service.high_availability import NotificationServerHaManager
from notification_service.proto import notification_service_pb2_grpc, notification_service_pb2
from notification_service.util.utils import event_to_proto, event_list_to_proto, member_to_proto, event_proto_to_event, \
proto_to_member
Expand Down

0 comments on commit c965fdf

Please sign in to comment.