-
Notifications
You must be signed in to change notification settings - Fork 12
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
Initialization #1
Conversation
bitrise.yml
Outdated
set -ex | ||
stepman audit --step-yml ./step.yml | ||
|
||
share-this-step: |
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.
we do not need the share workflow here anymore
bitrise.yml
Outdated
app: | ||
envs: | ||
# if you want to share this step into a StepLib | ||
- MY_STEPLIB_REPO_FORK_GIT_URL: $MY_STEPLIB_REPO_FORK_GIT_URL |
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.
we do not need the share related envs: MY_STEPLIB_REPO_FORK_GIT_URL & STEP_VERSION
|
||
# ---------------------------------------------------------------- | ||
# --- workflows to Share this step into a Step Library | ||
audit-this-step: |
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.
you can keep this for testing, just add as before workflow to the test wf
main.go
Outdated
|
||
successful := true | ||
|
||
log.Infof("Upload APKs") |
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.
IPAs?
main.go
Outdated
|
||
responseModel := &UploadURLRequest{} | ||
|
||
err = json.Unmarshal(body, responseModel) |
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.
move this to the if statement
main.go
Outdated
failf("Failed to unmarshal response body, error: %s", err) | ||
} | ||
|
||
err = uploadFile(responseModel.AppURL, configs.ZipPath) |
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.
move this to the if statement
main.go
Outdated
|
||
// parse environment variables | ||
scanner = bufio.NewScanner(strings.NewReader(configs.EnvironmentVariables)) | ||
envs := []*testing.EnvironmentVariable{} |
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.
var envs []*testing.EnvironmentVariable
main.go
Outdated
|
||
responseModel := &toolresults.ListStepsResponse{} | ||
|
||
err = json.Unmarshal(body, responseModel) |
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.
move this to the if statement
main.go
Outdated
|
||
log.Infof("Test results:") | ||
w := tabwriter.NewWriter(os.Stdout, 0, 0, 3, ' ', 0) | ||
if _, err := fmt.Fprintln(w, "Model\tAPI Level\tLocale\tOrientation\tOutcome\t"); err != nil { |
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.
API Level -> OS version?
main.go
Outdated
|
||
responseModel := map[string]string{} | ||
|
||
err = json.Unmarshal(body, &responseModel) |
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.
move to the if
main.go
Outdated
|
||
for fileName, fileURL := range responseModel { | ||
err := downloadFile(fileURL, filepath.Join(tempDir, fileName)) | ||
if err != nil { |
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.
move to the if
main.go
Outdated
} | ||
|
||
_, err = io.Copy(out, resp.Body) | ||
if err != nil { |
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.
move to the if
} | ||
}() | ||
|
||
_, err = ioutil.ReadAll(resp.Body) |
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.
move to the if
step.yml
Outdated
opts: | ||
title: "Zip path" | ||
summary: | | ||
The path to the zip file which contains the folder Debug-iphoneos and PROJECT_NAME_iphoneosDEVELOPMENT_TARGET-arm64.xctestrun. |
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.
PROJECT_NAME_iphoneos_DEVELOPMENT_TARGET-
step.yml
Outdated
category: "Debug" | ||
title: "Download files" | ||
summary: | | ||
If this input is set to `true` all files generated in the test run and the files you downloaded from the device (if you have set `directories_to_pull` input as well) will be downloaded. Otherwise, no any file will be downloaded. |
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.
generated in the test?
Otherwise, no any file?
summary: The token required to authenticate with the API. | ||
description: | | ||
The token required to authenticate with the API. | ||
is_required: true |
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.
is_sensitive: true, also update other inputs
} | ||
|
||
fmt.Println() | ||
log.Infof("Start test") |
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.
would not it possible to separate the phases into separate functions?
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.
pls have a look at my notes
No description provided.