Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade ci to support Python 3 #350

Merged
merged 9 commits into from
Mar 5, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ env:

stages:
- name: test_pr
if: type = pull_request
if: ((type = pull_request) AND (NOT commit_message =~ /ci run all/))
- name: test
if: (branch = master) AND (type != pull_request)
if: ((branch = master) AND (type != pull_request)) OR ((commit_message =~ /ci run all/) AND (type = pull_request))

script:
# This is the default script section that will be run for every 'test' stage
Expand All @@ -43,12 +43,12 @@ jobs:
include:
- stage: test_pr
script:
- ddev -e validate manifest -i
- ddev -e validate config
- ddev -e validate service-checks
- ddev -e validate metadata
- ddev validate manifest -i
- ddev validate config
- ddev validate service-checks
- ddev validate metadata
# with no params, ddev will only test integrations that are part of the branch diff
- ddev -e test
- ddev test
- stage: test
env: CHECK=aqua
- stage: test
Expand All @@ -63,12 +63,13 @@ jobs:
env: CHECK=traefik

before_install:
- PATH="$PATH:$(pyenv root)/versions/3.6/bin"
- PATH="$(pyenv root)/versions/3.7.1/bin:$PATH:$(pyenv root)/versions/3.6.7/bin"

install:
- pip install -U pip setuptools
- pip install -r requirements-dev.txt
- ddev config set extras .
- ddev config set repo extras

# we should clean generated files before we save the cache
# We don't want to save .pyc files, so we'll use find and -delete
Expand Down
28 changes: 17 additions & 11 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,46 @@
version: '{branch}.{build}'
image: Visual Studio 2017
clone_depth: 3
build: off
test: off
skip_branch_with_pr: true
cache:
- '%LOCALAPPDATA%\pip\Cache'

skip_branch_with_pr: true
skip_tags: true
branches:
only:
- master

environment:
PYTHON2: C:\Python27-x64
PYTHON3: C:\Python36-x64
PYTHON3: C:\Python37-x64

init:
# Add Python 3 to PATH
- set PATH=%PYTHON3%;%PYTHON3%\Scripts;%PATH%
# Add Python 2 to PATH
- set PATH=%PYTHON2%;%PYTHON2%\Scripts;%PATH%
- python -c "import sys; print(sys.version)"

# Add Python 2 to PATH before Python 3
- set PATH=%PYTHON2%;%PYTHON2%\Scripts;%PATH%
# Add Python 3 to PATH before Python 2
- set PATH=%PYTHON3%;%PYTHON3%\Scripts;%PATH%
- python -c "import sys; print(sys.version)"

# Test only what changed when it's a PR
- if defined APPVEYOR_PULL_REQUEST_NUMBER ( set "CHANGED_ONLY_FLAG= --changed" ) else ( set "CHANGED_ONLY_FLAG= " )

# Newer versions of Windows require this for full use of psutil
- diskperf -y

install:
- python -m pip install --upgrade --disable-pip-version-check pip virtualenv codecov
- pip uninstall -y docker-py
- pip install datadog_checks_dev[cli]
- ddev config set extras .
- ddev config set repo extras

test_script:
- ddev -e validate manifest -i
- ddev -e validate config
- ddev -e validate service-checks
- ddev -e validate metadata
- ddev -e test%CHANGED_ONLY_FLAG% -c aqua eventstore sortdb traefik
- ddev validate manifest -i
- ddev validate config
- ddev validate service-checks
- ddev validate metadata
- ddev test%CHANGED_ONLY_FLAG% -c aqua eventstore sortdb traefik