-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add python container to build pipeline #189
Open
johnpooch
wants to merge
2
commits into
master
Choose a base branch
from
johnpooch/fix-tests-2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,39 +1,41 @@ | ||
name: Test diplicity | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
build: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: python:2.7.18-buster | ||
|
||
steps: | ||
- name: Setup Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: '1.20' | ||
check-latest: true | ||
- name: Check Go version | ||
run: go version | ||
- name: Set up GoogleCloudPlatform | ||
uses: google-github-actions/setup-gcloud@v0 | ||
- name: Debug log GoogleCloudPlatform info | ||
run: gcloud info | ||
- name: Install App Engine Go | ||
run: gcloud components install app-engine-go | ||
- name: Extract GoogleCloudPlatform installation root | ||
run: echo "GCLOUD_ROOT=$(gcloud info | grep 'Installation Root:' | sed -e 's/.*\[\([^]]\+\).*/\1/')" >> $GITHUB_ENV | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
- name: Set up Python2.7 | ||
uses: actions/setup-python@v4 | ||
id: setup-python2 | ||
with: | ||
python-version: 2.7 | ||
- name: Start test server | ||
run: ${GITHUB_WORKSPACE}/diptest/start_test_server.sh | ||
- name: Run tests | ||
run: cd diptest && go test -v -timeout 40m | ||
steps: | ||
- name: Setup Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: "1.20" | ||
check-latest: true | ||
- name: Check Go version | ||
run: go version | ||
- name: Set up GoogleCloudPlatform | ||
uses: google-github-actions/setup-gcloud@v0 | ||
- name: Debug log GoogleCloudPlatform info | ||
run: gcloud info | ||
- name: Install App Engine Go | ||
run: gcloud components install app-engine-go | ||
- name: Extract GoogleCloudPlatform installation root | ||
run: echo "GCLOUD_ROOT=$(gcloud info | grep 'Installation Root:' | sed -e 's/.*\[\([^]]\+\).*/\1/')" >> $GITHUB_ENV | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
- name: Set up Python2.7 | ||
uses: actions/setup-python@v4 | ||
id: setup-python2 | ||
with: | ||
python-version: 2.7 | ||
- name: Start test server | ||
run: ${GITHUB_WORKSPACE}/diptest/start_test_server.sh | ||
- name: Run tests | ||
run: cd diptest && go test -v -timeout 40m |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This did not work unfortunately, when I tried it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh sorry, I didn't realize you had tried this already.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried it right before the other CL i mentioned you in. It didn't work because other parts of the cloud tool chain needs Python3 (!).
I got it working (up to a point) when I used
apt get
to install Python2.7, but then I got other errors as mentioned in that PR.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So at which point exactly do we need Python2.7? should we try wrapping the start and test scripts in dockerfiles? The Dockerfile I'm using for dev seems to work well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's very strange. I think most of the gcloud toolchain runs on Python3, but the dev_appserver is something they actually want to get rid of, but so many real customers use it that they can't - but it runs on 2.7 and they don't want to invest into upgrading. Something like that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm surprised. If you look at the Dockerfile I added, it doesn't explicitly use Python2.7 at all but it definitely brings up the API and admin apps successfully (was testing it last night).
I can't see why it works in the Dockerfile and wouldn't work in the pipeline.