Peripheral: Combine workflows

This commit is contained in:
Kyle Hornberg
2019-04-15 07:17:37 -05:00
parent 4628bc6164
commit 199fdcc4b2
2 changed files with 62 additions and 3 deletions
+61 -2
View File
@@ -5,7 +5,7 @@ workflow "Publish to PyPi" {
]
}
action "action-filter" {
action "Master Workflow" {
uses = "actions/bin/filter@master"
args = "branch master"
}
@@ -13,7 +13,7 @@ action "action-filter" {
action "Package" {
uses = "khornberg/python-actions/setup-py/3.7@master"
args = "bdist_wheel sdist"
needs = ["action-filter"]
needs = ["Master Workflow"]
}
action "PyPi Twine Upload" {
@@ -22,3 +22,62 @@ action "PyPi Twine Upload" {
args = "upload dist/*"
secrets = ["TWINE_USERNAME", "TWINE_PASSWORD"]
}
# PR workflow
workflow "Test" {
on = "push"
resolves = [
"Report", "Lint", "Docs"
]
}
action "Filter" {
uses = "actions/bin/filter@master"
args = "not branch master"
}
action "Curl" {
uses = "actions/bin/curl@master"
args = "curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter"
needs = ["Filter"]
}
action "Prepare" {
uses = "actions/bin/sh@master"
args = ["chmod +x ./cc-test-reporter && ./cc-test-reporter before-build"]
secrets = ["CC_TEST_REPORTER_ID"]
needs = ["Curl"]
}
action "Requirements 3.6" {
uses = "jefftriplett/python-actions@master"
args = "pip install tox"
needs = ["Prepare"]
}
action "Test 3.6" {
uses = "jefftriplett/python-actions@master"
args = "tox -e py36 -v"
needs = ["Requirements 3.6"]
}
action "Lint" {
uses = "jefftriplett/python-actions@master"
args = "tox -e check -v"
needs = ["Requirements 3.6"]
}
action "Docs" {
uses = "jefftriplett/python-actions@master"
args = "tox -e docs -v"
needs = ["Requirements 3.6"]
}
action "Report" {
uses = "actions/bin/sh@master"
args = ["apt-get update && apt-get install git-core -y && ./cc-test-reporter after-build --coverage-input-type coverage.py"]
needs = ["Test 3.6"]
secrets = ["CC_TEST_REPORTER_ID"]
}
+1 -1
View File
@@ -21,4 +21,4 @@ include .pyup.yml
include *.json
include *.sh
global-exclude *.py[cod] __pycache__ *.so *.dylib
global-exclude *.py[cod] __pycache__ *.so *.dylib .github .github/*