Skip to content

Commit 09e814d

Browse files
authored
Merge pull request #118 from cloudblue/move-to-github-actions
Created workflow files
2 parents 5d13803 + 23a149d commit 09e814d

File tree

5 files changed

+95
-53
lines changed

5 files changed

+95
-53
lines changed

.github/workflows/build.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Build Connect Python SDK
2+
3+
on:
4+
push:
5+
branches: "*"
6+
tags:
7+
- '*'
8+
9+
pull_request:
10+
branches: [ master ]
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
python-version: [2.7, 3.5, 3.6, 3.7, 3.8]
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v2
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -r requirements/test.txt
28+
pip install -r requirements/sdk.txt
29+
pip install pytest-cov
30+
- name: Linting
31+
run: |
32+
flake8 connect
33+
- name: Testing
34+
run: |
35+
pytest --cov-report=xml --cov=./connect
36+
sed -i "s/version='0.0.0'/version='${TRAVIS_TAG}'/g" setup.py
37+
- name: Upload coverage
38+
uses: codecov/codecov-action@v1
39+
with:
40+
file: ./coverage.xml
41+
fail_ci_if_error: true
42+
verbose: true
43+
- name: SonarCloud
44+
uses: SonarSource/sonarcloud-github-action@master
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.github/workflows/deploy.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Deploy Connect Python SDK
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Set up Python
14+
uses: actions/setup-python@v2
15+
with:
16+
python-version: '3.x'
17+
- name: Install dependencies
18+
run: |
19+
python -m pip install --upgrade pip
20+
pip install -r requirements/test.txt
21+
pip install -r requirements/sdk.txt
22+
pip install pytest-cov
23+
- name: Linting
24+
run: |
25+
flake8 connect
26+
- name: Testing
27+
run: |
28+
pytest --cov-report=xml --cov=./connect
29+
sed -i "s/version='0.0.0'/version='${TRAVIS_TAG}'/g" setup.py
30+
- name: Upload coverage
31+
uses: codecov/codecov-action@v1
32+
with:
33+
file: ./coverage.xml
34+
fail_ci_if_error: true
35+
verbose: true
36+
- name: SonarCloud
37+
uses: SonarSource/sonarcloud-github-action@master
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
41+
- name: Build and publish
42+
env:
43+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
44+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
45+
run: |
46+
python setup.py sdist bdist_wheel
47+
twine upload dist/*

.travis.yml

Lines changed: 0 additions & 51 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Connect Python SDK
22

3-
![pyversions](https://img.shields.io/pypi/pyversions/connect-sdk.svg) [![PyPi Status](https://img.shields.io/pypi/v/connect-sdk.svg)](https://pypi.org/project/connect-sdk/) [![codecov](https://codecov.io/gh/cloudblue/connect-python-sdk/branch/master/graph/badge.svg)](https://codecov.io/gh/cloudblue/connect-python-sdk) [![Build Status](https://travis-ci.org/cloudblue/connect-python-sdk.svg?branch=master)](https://travis-ci.org/cloudblue/connect-python-sdk) [![PyPI status](https://img.shields.io/pypi/status/connect-sdk.svg)](https://pypi.python.org/pypi/connect-sdk/) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=connectpythonsdk&metric=alert_status)](https://sonarcloud.io/dashboard?id=connectpythonsdk)
3+
![pyversions](https://img.shields.io/pypi/pyversions/connect-sdk.svg) [![PyPi Status](https://img.shields.io/pypi/v/connect-sdk.svg)](https://pypi.org/project/connect-sdk/) [![codecov](https://codecov.io/gh/cloudblue/connect-python-sdk/branch/master/graph/badge.svg)](https://codecov.io/gh/cloudblue/connect-python-sdk) [![Build Status](https://github.com/cloudblue/connect-python-sdk/workflows/Build%20Connect%20Python%20SDK/badge.svg)](https://github.com/cloudblue/connect-python-sdk/actions) [![PyPI status](https://img.shields.io/pypi/status/connect-sdk.svg)](https://pypi.python.org/pypi/connect-sdk/) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=connectpythonsdk&metric=alert_status)](https://sonarcloud.io/dashboard?id=connectpythonsdk)
44

55
Connect Python SDK allows an easy and fast integration with Connect fulfillment API. Thanks to it you can automate the fulfillment of orders generated by your products.
66

connect/resources/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
'UsageAutomation',
2525
'UsageFileAutomation',
2626
'TierAccountRequestAutomation',
27-
'Subscription',
2827
'BillingRequest',
2928
'RecurringAsset',
3029
'AssetRequestResource'

0 commit comments

Comments
 (0)