-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into DATAUP-233-wdio-travis
- Loading branch information
Showing
21 changed files
with
373 additions
and
247 deletions.
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
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
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
name: Build Truss Branch Image | ||
'on': | ||
pull_request: | ||
branches: | ||
- truss | ||
types: | ||
- opened | ||
- synchronize | ||
- ready_for_review | ||
jobs: | ||
docker_build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out GitHub Repo | ||
if: github.event.pull_request.draft == false | ||
with: | ||
ref: "${{ github.event.pull_request.head.sha }}" | ||
uses: actions/checkout@v2 | ||
- name: Build and Push to Packages | ||
if: github.event.pull_request.draft == false | ||
env: | ||
PR: "${{ github.event.pull_request.number }}" | ||
SHA: "${{ github.event.pull_request.head.sha }}" | ||
DOCKER_ACTOR: "jsfillman" | ||
DOCKER_TOKEN: "${{ secrets.GHCR_TOKEN }}" | ||
run: "./.github/workflows/scripts/build_truss_pr.sh\n" |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
name: Build Truss Image Push | ||
'on': | ||
push: | ||
branches: | ||
- truss | ||
jobs: | ||
docker_build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out GitHub Repo | ||
if: github.event.pull_request.draft == false | ||
with: | ||
ref: "${{ github.event.pull_request.head.sha }}" | ||
uses: actions/checkout@v2 | ||
- name: Build and Push to Packages | ||
if: github.event.pull_request.draft == false | ||
env: | ||
PR: "${{ github.event.pull_request.number }}" | ||
SHA: "${{ github.event.pull_request.head.sha }}" | ||
DOCKER_ACTOR: "jsfillman" | ||
DOCKER_TOKEN: "${{ secrets.GHCR_TOKEN }}" | ||
run: "./.github/workflows/scripts/build_truss_push.sh\n" |
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,15 +1,16 @@ | ||
#! /usr/bin/env bash | ||
|
||
export MY_APP=$(echo "${GITHUB_REPOSITORY}"/$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}' | sed -e "s/:refs//")) | ||
export MY_ORG=$(echo "${GITHUB_REPOSITORY}" | awk -F / '{print $1}') | ||
export MY_APP=$(echo "${GITHUB_REPOSITORY}" | awk -F / '{print $2}') | ||
export DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") | ||
export BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") | ||
export COMMIT=$(echo "$SHA" | cut -c -7) | ||
|
||
docker login -u "$DOCKER_ACTOR" -p "$DOCKER_TOKEN" docker.pkg.github.com | ||
docker login -u "$DOCKER_ACTOR" -p "$DOCKER_TOKEN" ghcr.io | ||
docker build --build-arg BUILD_DATE="$DATE" \ | ||
--build-arg COMMIT="$COMMIT" \ | ||
--build-arg BRANCH="$GITHUB_HEAD_REF" \ | ||
--build-arg PULL_REQUEST="$PR" \ | ||
--label us.kbase.vcs-pull-req="$PR" \ | ||
-t docker.pkg.github.com/"$MY_APP":"pr-""$PR" . | ||
docker push docker.pkg.github.com/"$MY_APP":"pr-""$PR" | ||
-t ghcr.io/"$MY_ORG"/"$MY_APP":"pr-""$PR" . | ||
docker push ghcr.io/"$MY_ORG"/"$MY_APP":"pr-""$PR" |
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,15 +1,17 @@ | ||
#! /usr/bin/env bash | ||
|
||
export MY_APP=$(echo "${GITHUB_REPOSITORY}"/$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}' | sed -e "s/:refs//")"-develop") | ||
export MY_ORG=$(echo "${GITHUB_REPOSITORY}" | awk -F / '{print $1}') | ||
export MY_APP=$(echo $(echo "${GITHUB_REPOSITORY}" | awk -F / '{print $2}')"-develop") | ||
export DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") | ||
export BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") | ||
export COMMIT=$(echo "$SHA" | cut -c -7) | ||
|
||
docker login -u "$DOCKER_ACTOR" -p "$DOCKER_TOKEN" docker.pkg.github.com | ||
echo $DOCKER_TOKEN | docker login ghcr.io -u $DOCKER_ACTOR --password-stdin | ||
docker build --build-arg BUILD_DATE="$DATE" \ | ||
--build-arg COMMIT="$COMMIT" \ | ||
--build-arg BRANCH="$GITHUB_HEAD_REF" \ | ||
--build-arg PULL_REQUEST="$PR" \ | ||
--label us.kbase.vcs-pull-req="$PR" \ | ||
-t docker.pkg.github.com/"$MY_APP":"pr-""$PR" . | ||
docker push docker.pkg.github.com/"$MY_APP":"pr-""$PR" | ||
-t ghcr.io/"$MY_ORG"/"$MY_APP":"pr-""$PR" . | ||
docker push ghcr.io/"$MY_ORG"/"$MY_APP":"pr-""$PR" | ||
|
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#! /usr/bin/env bash | ||
|
||
export MY_ORG=$(echo "${GITHUB_REPOSITORY}" | awk -F / '{print $1}') | ||
export MY_APP=$(echo $(echo "${GITHUB_REPOSITORY}" | awk -F / '{print $2}')"-truss") | ||
export DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") | ||
export BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") | ||
export COMMIT=$(echo "$SHA" | cut -c -7) | ||
|
||
echo $DOCKER_TOKEN | docker login ghcr.io -u $DOCKER_ACTOR --password-stdin | ||
docker build --build-arg BUILD_DATE="$DATE" \ | ||
--build-arg COMMIT="$COMMIT" \ | ||
--build-arg BRANCH="$GITHUB_HEAD_REF" \ | ||
--build-arg PULL_REQUEST="$PR" \ | ||
--label us.kbase.vcs-pull-req="$PR" \ | ||
-t ghcr.io/"$MY_ORG"/"$MY_APP":"pr-""$PR" . | ||
docker push ghcr.io/"$MY_ORG"/"$MY_APP":"pr-""$PR" | ||
|
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#! /usr/bin/env bash | ||
|
||
export MY_ORG=$(echo "${GITHUB_REPOSITORY}" | awk -F / '{print $1}') | ||
export MY_APP=$(echo "${GITHUB_REPOSITORY}" | awk -F / '{print $2}')"-truss" | ||
export DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") | ||
export BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") | ||
export COMMIT=$(echo "$SHA" | cut -c -7) | ||
|
||
docker login -u "$DOCKER_ACTOR" -p "$DOCKER_TOKEN" ghcr.io | ||
docker build --build-arg BUILD_DATE="$DATE" \ | ||
--build-arg COMMIT="$COMMIT" \ | ||
--build-arg BRANCH="$GITHUB_HEAD_REF" \ | ||
-t ghcr.io/"$MY_ORG"/"$MY_APP":"latest" . | ||
docker push ghcr.io/"$MY_ORG"/"$MY_APP":"latest" |
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
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,11 +1,12 @@ | ||
#! /usr/bin/env bash | ||
|
||
export MY_APP=$(echo "${GITHUB_REPOSITORY}"/$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}' | sed -e "s/:refs//")) | ||
export MY_ORG=$(echo "${GITHUB_REPOSITORY}" | awk -F / '{print $1}') | ||
export MY_APP=$(echo "${GITHUB_REPOSITORY}" | awk -F / '{print $2}') | ||
export DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") | ||
export BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") | ||
export COMMIT=$(echo "$SHA" | cut -c -7) | ||
|
||
docker login -u "$DOCKER_ACTOR" -p "$DOCKER_TOKEN" docker.pkg.github.com | ||
docker pull docker.pkg.github.com/"$MY_APP":"pr-""$PR" | ||
docker tag docker.pkg.github.com/"$MY_APP":"pr-""$PR" docker.pkg.github.com/"$MY_APP":"latest" | ||
docker push docker.pkg.github.com/"$MY_APP":"latest" | ||
docker login -u "$DOCKER_ACTOR" -p "$DOCKER_TOKEN" ghcr.io | ||
docker pull ghcr.io/"$MY_ORG"/"$MY_APP":"pr-""$PR" | ||
docker tag ghcr.io/"$MY_ORG"/"$MY_APP":"pr-""$PR" ghcr.io/"$MY_ORG"/"$MY_APP":"latest" | ||
docker push ghcr.io/"$MY_ORG"/"$MY_APP":"latest" |
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,11 +1,12 @@ | ||
#! /usr/bin/env bash | ||
|
||
export MY_APP=$(echo "${GITHUB_REPOSITORY}"/$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}' | sed -e "s/:refs//")"-develop") | ||
export MY_ORG=$(echo "${GITHUB_REPOSITORY}" | awk -F / '{print $1}') | ||
export MY_APP=$(echo $(echo "${GITHUB_REPOSITORY}" | awk -F / '{print $2}')"-develop") | ||
export DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") | ||
export BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") | ||
export COMMIT=$(echo "$SHA" | cut -c -7) | ||
|
||
docker login -u "$DOCKER_ACTOR" -p "$DOCKER_TOKEN" docker.pkg.github.com | ||
docker pull docker.pkg.github.com/"$MY_APP":"pr-""$PR" | ||
docker tag docker.pkg.github.com/"$MY_APP":"pr-""$PR" docker.pkg.github.com/"$MY_APP":"latest" | ||
docker push docker.pkg.github.com/"$MY_APP":"latest" | ||
docker login -u "$DOCKER_ACTOR" -p "$DOCKER_TOKEN" ghcr.io | ||
docker pull ghcr.io/"$MY_ORG"/"$MY_APP":"pr-""$PR" | ||
docker tag ghcr.io/"$MY_ORG"/"$MY_APP":"pr-""$PR" ghcr.io/"$MY_ORG"/"$MY_APP":"latest" | ||
docker push ghcr.io/"$MY_ORG"/"$MY_APP":"latest" |
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
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
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
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 |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# Integration Testing Framework | ||
|
||
Date: 2020-10-12 | ||
|
||
Integration testing and end-to-end (e2e) testing is not actively used in this repo. To implement integration/e2e testing, a testing framework needs to be selected and implemented. | ||
|
||
## Author(s) | ||
|
||
@eamahanna | ||
|
||
## Status | ||
|
||
Accepted | ||
|
||
## Alternatives Considered | ||
|
||
* WebDriver.io | ||
* Cypress | ||
* No integration testing | ||
|
||
## Decision Outcome | ||
|
||
Selenium WebDriver will be used for integration and e2e testing. | ||
|
||
## Consequences | ||
|
||
There will be overhead to create and maintain additional tests. | ||
|
||
## Pros and Cons of the Alternatives | ||
|
||
### Webdriver.io | ||
|
||
* `+` Other repos in KBase use it | ||
* `+` Has cross browser testing (Chrome, Firefox, Edge, IE, Opera, Safari) | ||
* `+` Supports multiple languages | ||
* `+` Supports iframes | ||
* `-` Steep learning curve for new developers | ||
* `-` Challenging to implement | ||
* `-` Test execution is slow | ||
* `-` Can be flaky | ||
|
||
### Cypress | ||
|
||
* `+` Easy to setup | ||
* `+` Tests can be written quickly | ||
* `+` Provides access to a dashboard for easy debugging | ||
* `+` Small learning curve for new developers | ||
* `+` Comprehensive documentation | ||
* `+` Free for open source projects | ||
* `-` Can only test using JavaScript | ||
* `-` Has limited cross browser testing (Chrome, Edge, Electron, Firefox - Beta) | ||
* `-` KBase developers will have to learn another testing framework | ||
* `-` Limited iframe support (the narrative uses iframes in several locations) | ||
|
||
### No integration/e2e testing | ||
|
||
* `+` Will not take any time away from feature development | ||
* `+` Less tests to maintain | ||
* `-` Will not expand test coverage | ||
* `-` Have low confindence during the development cycle | ||
* `-` Will not have tests to catch integration bugs | ||
* `-` Testing does not reflect the user expereience | ||
|
||
## References | ||
|
||
* [Cypress.io](https://www.cypress.io/) | ||
* [WebDriver.io](https://webdriver.io/) | ||
* [Applitools: Cypress vs Selenium WebDriver](https://applitools.com/blog/cypress-vs-selenium-webdriver-better-or-just-different/) |
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
Oops, something went wrong.