Browse Source
* Add CI for python API * Fix task assign without process definition * Fix ci * Add header * Add build badge for pydolphinscheduler * Add content to README.md * Remove unnecessary blank line3.0.0/version-upgrade
Jiajie Zhong
3 years ago
committed by
GitHub
14 changed files with 134 additions and 31 deletions
@ -0,0 +1,53 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more |
||||
# contributor license agreements. See the NOTICE file distributed with |
||||
# this work for additional information regarding copyright ownership. |
||||
# The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
# (the "License"); you may not use this file except in compliance with |
||||
# the License. You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
|
||||
name: Python API Tests |
||||
|
||||
on: |
||||
push: |
||||
branches: |
||||
- dev |
||||
paths: |
||||
- 'dolphinscheduler-python/**' |
||||
pull_request: |
||||
paths: |
||||
- 'dolphinscheduler-python/**' |
||||
|
||||
defaults: |
||||
run: |
||||
working-directory: dolphinscheduler-python/pydolphinscheduler |
||||
|
||||
jobs: |
||||
build: |
||||
runs-on: ${{ matrix.os }} |
||||
strategy: |
||||
fail-fast: false |
||||
matrix: |
||||
python-version: [3.6, 3.7, 3.8, 3.9] |
||||
os: [ubuntu-18.04, macOS-latest, windows-latest] |
||||
|
||||
steps: |
||||
- uses: actions/checkout@v2 |
||||
- name: Set up Python ${{ matrix.python-version }} |
||||
uses: actions/setup-python@v2 |
||||
with: |
||||
python-version: ${{ matrix.python-version }} |
||||
- name: Install dependencies & pydolphinscheduler |
||||
run: | |
||||
pip install -r requirements.txt -r requirements_dev.txt |
||||
pip install -e . |
||||
- name: Run tests |
||||
run: | |
||||
pytest |
@ -0,0 +1,22 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more |
||||
# contributor license agreements. See the NOTICE file distributed with |
||||
# this work for additional information regarding copyright ownership. |
||||
# The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
# (the "License"); you may not use this file except in compliance with |
||||
# the License. You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
|
||||
[pytest] |
||||
# Do not test test_java_gateway.py due to we can not mock java gateway for now |
||||
addopts = --ignore=tests/test_java_gateway.py |
||||
|
||||
# add path here to skip pytest scan it |
||||
norecursedirs = |
||||
tests/testing |
@ -1,16 +0,0 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one |
||||
# or more contributor license agreements. See the NOTICE file |
||||
# distributed with this work for additional information |
||||
# regarding copyright ownership. The ASF licenses this file |
||||
# to you under the Apache License, Version 2.0 (the |
||||
# "License"); you may not use this file except in compliance |
||||
# with the License. You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, |
||||
# software distributed under the License is distributed on an |
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||
# KIND, either express or implied. See the License for the |
||||
# specific language governing permissions and limitations |
||||
# under the License. |
@ -0,0 +1,27 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one |
||||
# or more contributor license agreements. See the NOTICE file |
||||
# distributed with this work for additional information |
||||
# regarding copyright ownership. The ASF licenses this file |
||||
# to you under the Apache License, Version 2.0 (the |
||||
# "License"); you may not use this file except in compliance |
||||
# with the License. You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, |
||||
# software distributed under the License is distributed on an |
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||
# KIND, either express or implied. See the License for the |
||||
# specific language governing permissions and limitations |
||||
# under the License. |
||||
|
||||
import uuid |
||||
|
||||
from pydolphinscheduler.core.task import Task as SourceTask |
||||
|
||||
|
||||
class Task(SourceTask): |
||||
DEFAULT_VERSION = 1 |
||||
|
||||
def gen_code_and_version(self): |
||||
return uuid.uuid1().time, self.DEFAULT_VERSION |
Loading…
Reference in new issue