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

Initialization #1

Merged
merged 4 commits into from
Sep 3, 2018
Merged

Initialization #1

merged 4 commits into from
Sep 3, 2018

Conversation

trapacska
Copy link
Contributor

No description provided.

bitrise.yml Outdated
set -ex
stepman audit --step-yml ./step.yml

share-this-step:
Copy link
Contributor

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
Copy link
Contributor

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:
Copy link
Contributor

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")
Copy link
Contributor

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)
Copy link
Contributor

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)
Copy link
Contributor

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{}
Copy link
Contributor

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)
Copy link
Contributor

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 {
Copy link
Contributor

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)
Copy link
Contributor

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 {
Copy link
Contributor

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 {
Copy link
Contributor

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)
Copy link
Contributor

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.
Copy link
Contributor

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.
Copy link
Contributor

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
Copy link
Contributor

@godrei godrei Aug 29, 2018

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")
Copy link
Contributor

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?

Copy link
Contributor

@godrei godrei left a 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

@trapacska trapacska merged commit 64b8e9f into master Sep 3, 2018
@trapacska trapacska deleted the initialization branch September 3, 2018 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants