Add python:3 action support.
Update tests to work in both Python 2 and Python 3.
Rename pythonaction to python3action for container image name for clarity.
Add tests for python:2 and python:3.
Add image names for all the actions. Rename javaaction to java8action for consistency.
diff --git a/settings.gradle b/settings.gradle
index ed84a46..1955feb 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -6,6 +6,7 @@
include 'core:nodejs6Action'
include 'core:actionProxy'
include 'core:pythonAction'
+include 'core:python2Action'
include 'core:swift3Action'
include 'core:javaAction'
diff --git a/tests/build.gradle b/tests/build.gradle
index f9e95d9..32275c2 100644
--- a/tests/build.gradle
+++ b/tests/build.gradle
@@ -27,6 +27,7 @@
':core:nodejs6Action:distDocker',
':core:actionProxy:distDocker',
':core:pythonAction:distDocker',
+ ':core:python2Action:distDocker',
':core:javaAction:distDocker',
':core:swift3Action:distDocker',
':sdk:docker:distDocker',
diff --git a/tests/src/test/scala/actionContainers/ActionProxyContainerTests.scala b/tests/src/test/scala/actionContainers/ActionProxyContainerTests.scala
index 7c1e5a2..cee440b 100644
--- a/tests/src/test/scala/actionContainers/ActionProxyContainerTests.scala
+++ b/tests/src/test/scala/actionContainers/ActionProxyContainerTests.scala
@@ -56,9 +56,10 @@
val python = """
|#!/usr/bin/env python
+ |from __future__ import print_function
|import sys
- |print 'hello stdout'
- |print >> sys.stderr, 'hello stderr'
+ |print('hello stdout')
+ |print('hello stderr', file=sys.stderr)
|print(sys.argv[1])
""".stripMargin.trim
@@ -87,10 +88,10 @@
|#!/usr/bin/env python
|import os
|
- |print '{ "api_host": "%s", "api_key": "%s", "namespace": "%s", "action_name" : "%s", "activation_id": "%s", "deadline": "%s" }' % (
+ |print('{ "api_host": "%s", "api_key": "%s", "namespace": "%s", "action_name" : "%s", "activation_id": "%s", "deadline": "%s" }' % (
| os.environ['__OW_API_HOST'], os.environ['__OW_API_KEY'],
| os.environ['__OW_NAMESPACE'], os.environ['__OW_ACTION_NAME'],
- | os.environ['__OW_ACTIVATION_ID'], os.environ['__OW_DEADLINE'])
+ | os.environ['__OW_ACTIVATION_ID'], os.environ['__OW_DEADLINE']))
""".stripMargin.trim
val perl = """