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 python version being used by the ci workflow. #315

Merged
merged 8 commits into from
Jul 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 9 additions & 5 deletions .github/workflows/ci-v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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
16 changes: 11 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion aetest/instance_vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion v2/aetest/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down