diff --git a/.github/workflows/ci-v2.yaml b/.github/workflows/ci-v2.yaml index 35102e8a..28794e71 100644 --- a/.github/workflows/ci-v2.yaml +++ b/.github/workflows/ci-v2.yaml @@ -17,10 +17,11 @@ jobs: working-directory: ./v2 steps: - - name: Update base image and install Python2 + - name: Update base image, intall Python2 and Python3 run: | sudo apt-get update - sudo apt-get install -y python2 + sudo apt-get install -y python2 + sudo apt-get install -y python3 - name: Set up Go uses: actions/setup-go@v2 with: @@ -51,6 +52,7 @@ jobs: working-directory: ${{env.working-directory}} run: | export APPENGINE_DEV_APPSERVER=$(which dev_appserver.py) + export CLOUDSDK_PYTHON="python3" go test -v -cover -race google.golang.org/appengine/v2/... # TestAPICallAllocations doesn't run under race detector. go test -v -cover google.golang.org/appengine/v2/internal/... -run TestAPICallAllocations @@ -64,12 +66,13 @@ jobs: go-version: [ '1.11.x', '1.12.x'] env: working-directory: ./v2 - + steps: - - name: Update base image and intall Python2 + - name: Update base image, intall Python2 and Python3 run: | sudo apt-get update - sudo apt-get install -y python2 + sudo apt-get install -y python2 + sudo apt-get install -y python3 - name: Set up Go uses: actions/setup-go@v2 with: @@ -99,6 +102,7 @@ jobs: working-directory: ${{env.working-directory}} run: | export APPENGINE_DEV_APPSERVER=$(which dev_appserver.py) + export CLOUDSDK_PYTHON="python3" go test -v -cover -race google.golang.org/appengine/v2/... # TestAPICallAllocations doesn't run under race detector. go test -v -cover google.golang.org/appengine/v2/internal/... -run TestAPICallAllocations diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d9e5c37..4b9f917c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,10 +15,12 @@ jobs: go-version: [ '1.11.x', '1.12.x', '1.13.x', '1.14.x', '1.15.x', '1.16.x', '1.18.x', '1.19.x', '1.20.x'] steps: - - name: Update base image and intall Python2 + - name: Update base image, intall Python2 and Python3 run: | sudo apt-get update - sudo apt-get install -y python2 + sudo apt-get install -y python2 + sudo apt-get install -y python3 + export CLOUDSDK_PYTHON="python3" - name: Set up Go uses: actions/setup-go@v2 with: @@ -47,10 +49,11 @@ jobs: GO111MODULE: on run: | export APPENGINE_DEV_APPSERVER=$(which dev_appserver.py) + export CLOUDSDK_PYTHON="python3" go test -v -cover -race google.golang.org/appengine/... # TestAPICallAllocations doesn't run under race detector. go test -v -cover google.golang.org/appengine/internal/... -run TestAPICallAllocations - + test-gopath: runs-on: ubuntu-latest strategy: @@ -60,10 +63,12 @@ jobs: go-version: [ '1.11.x', '1.12.x'] steps: - - name: Update base image and intall Python2 + - name: Update base image, intall Python2 and Python3 run: | sudo apt-get update - sudo apt-get install -y python2 + sudo apt-get install -y python2 + sudo apt-get install -y python3 + export CLOUDSDK_PYTHON="python3" - name: Set up Go uses: actions/setup-go@v2 with: @@ -91,6 +96,7 @@ jobs: - name: Test gopath run: | export APPENGINE_DEV_APPSERVER=$(which dev_appserver.py) + export CLOUDSDK_PYTHON="python3" go test -v -cover -race google.golang.org/appengine/... # TestAPICallAllocations doesn't run under race detector. go test -v -cover google.golang.org/appengine/internal/... -run TestAPICallAllocations diff --git a/aetest/instance_vm.go b/aetest/instance_vm.go index e1647fdb..1f36bbe6 100644 --- a/aetest/instance_vm.go +++ b/aetest/instance_vm.go @@ -145,7 +145,7 @@ func (i *instance) startChild() (err error) { return err } } - executable := os.Getenv("APPENGINE_DEV_APPSERVER_BINARY") + executable := os.Getenv("APPENGINE_DEV_APPSERVER") var appserverArgs []string if len(executable) == 0 { executable, err = findPython() diff --git a/v2/aetest/instance.go b/v2/aetest/instance.go index 994bec64..5ca59f64 100644 --- a/v2/aetest/instance.go +++ b/v2/aetest/instance.go @@ -167,7 +167,7 @@ func fileExists(path string) bool { } func findPython() (path string, err error) { - for _, name := range []string{"python2.7", "python"} { + for _, name := range []string{"python3"} { path, err = exec.LookPath(name) if err == nil { return