This repository has been archived by the owner on Oct 15, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(tests): ensure test harness is up-to-date (#33)
- Loading branch information
1 parent
baa7fc4
commit bf6af90
Showing
12 changed files
with
230 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,24 @@ | ||
version: 2 | ||
version: 2.1 | ||
|
||
jobs: | ||
lint-py2: | ||
docker: | ||
- image: python:2.7.14 | ||
steps: | ||
- checkout | ||
- run: pip install pre-commit | ||
- restore_cache: | ||
keys: | ||
- cache-pre-commit2-{{ checksum ".pre-commit-config.yaml" }} | ||
- run: pre-commit run --all-files | ||
- save_cache: | ||
key: cache-pre-commit2-{{ checksum ".pre-commit-config.yaml" }} | ||
paths: | ||
- ~/.cache/pre-commit | ||
|
||
lint-py3: | ||
docker: | ||
- image: python:3.6.2 | ||
steps: | ||
- checkout | ||
- run: pip install pre-commit | ||
- restore_cache: | ||
keys: | ||
- cache-pre-commit3-{{ checksum ".pre-commit-config.yaml" }} | ||
- run: pre-commit run --all-files | ||
- save_cache: | ||
key: cache-pre-commit3-{{ checksum ".pre-commit-config.yaml" }} | ||
paths: | ||
- ~/.cache/pre-commit | ||
orbs: | ||
linter: thekevjames/[email protected] | ||
|
||
jobs: | ||
test: | ||
docker: | ||
- image: googleapis/nox:0.17.0 | ||
- image: thekevjames/nox:2019.5.30 | ||
environment: | ||
GOOGLE_APPLICATION_CREDENTIALS: /key.json | ||
steps: | ||
- run: echo ${GOOGLE_SERVICE_JSON} | base64 -d > ${GOOGLE_APPLICATION_CREDENTIALS} | ||
- run: echo ${GOOGLE_SERVICE_PUBLIC} | base64 -d > ${GOOGLE_APPLICATION_CREDENTIALS} | ||
- checkout | ||
- run: nox | ||
|
||
pypi: | ||
docker: | ||
- image: python:3.7.0-slim | ||
- image: python:3.7.3-slim | ||
steps: | ||
- run: pip install twine | ||
- run: pip install pyopenssl twine | ||
- checkout | ||
- deploy: | ||
name: upload to pypi | ||
|
@@ -53,7 +28,7 @@ jobs: | |
github: | ||
docker: | ||
- image: python:3.7.0-alpine3.8 | ||
- image: python:3.7.3-alpine3.8 | ||
steps: | ||
- run: apk add --no-cache curl git openssh-client | ||
- checkout | ||
|
@@ -75,14 +50,30 @@ jobs: | |
cat release-description.md | ./bin/linux/amd64/github-release edit -t ${CIRCLE_TAG} -d - | ||
workflows: | ||
version: 2 | ||
run-jobs: | ||
jobs: | ||
- lint-py2: | ||
- linter/pre-commit: | ||
name: lint-py27 | ||
config_file: .pre-commit-config.py27.yaml | ||
python_version: 2.7.14 | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- linter/pre-commit: | ||
name: lint-py35 | ||
python_version: 3.5.7 | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- linter/pre-commit: | ||
name: lint-py36 | ||
python_version: 3.6.8 | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- lint-py3: | ||
- linter/pre-commit: | ||
name: lint-py37 | ||
python_version: 3.7.3 | ||
filters: | ||
tags: | ||
only: /.*/ | ||
|
@@ -100,8 +91,10 @@ workflows: | |
tags: | ||
only: /[0-9]+\.[0-9]+\.[0-9]+/ | ||
requires: | ||
- lint-py2 | ||
- lint-py3 | ||
- lint-py27 | ||
- lint-py35 | ||
- lint-py36 | ||
- lint-py37 | ||
- test | ||
- github: | ||
context: org-global | ||
|
@@ -111,6 +104,8 @@ workflows: | |
tags: | ||
only: /[0-9]+\.[0-9]+\.[0-9]+/ | ||
requires: | ||
- lint-py2 | ||
- lint-py3 | ||
- lint-py27 | ||
- lint-py35 | ||
- lint-py36 | ||
- lint-py37 | ||
- test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.2.3 | ||
hooks: | ||
- id: check-ast | ||
- id: check-builtin-literals | ||
- id: check-case-conflict | ||
- id: check-docstring-first | ||
- id: check-executables-have-shebangs | ||
- id: check-json | ||
- id: check-merge-conflict | ||
- id: check-symlinks | ||
- id: check-vcs-permalinks | ||
- id: check-xml | ||
- id: check-yaml | ||
args: [--allow-multiple-documents] | ||
- id: debug-statements | ||
- id: detect-private-key | ||
- id: double-quote-string-fixer | ||
- id: end-of-file-fixer | ||
- id: file-contents-sorter | ||
files: .(docker|git)ignore | ||
- id: mixed-line-ending | ||
args: [--fix=lf] | ||
- id: name-tests-test | ||
- id: requirements-txt-fixer | ||
- id: trailing-whitespace | ||
- repo: https://github.com/pre-commit/mirrors-pylint | ||
rev: v1.9.1 | ||
hooks: | ||
- id: pylint | ||
args: | ||
- --max-line-length=79 | ||
- --ignore-imports=yes | ||
- -d fixme | ||
- -d import-error | ||
- -d invalid-name | ||
- -d locally-disabled | ||
- -d missing-docstring | ||
- -d too-few-public-methods | ||
- repo: https://github.com/Lucas-C/pre-commit-hooks | ||
rev: v1.1.6 | ||
hooks: | ||
- id: remove-crlf | ||
- id: remove-tabs | ||
- repo: https://github.com/asottile/reorder_python_imports | ||
rev: v1.5.0 | ||
hooks: | ||
- id: reorder-python-imports | ||
args: [--py26-plus] | ||
- repo: https://github.com/asottile/yesqa | ||
rev: v0.0.11 | ||
hooks: | ||
- id: yesqa | ||
- repo: https://github.com/pre-commit/mirrors-autopep8 | ||
rev: v1.4.4 | ||
hooks: | ||
- id: autopep8 | ||
- repo: https://github.com/pre-commit/pygrep-hooks | ||
rev: v1.4.0 | ||
hooks: | ||
- id: python-no-eval | ||
- id: python-no-log-warn | ||
- id: python-use-type-annotations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.