-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sync GitHub RWA to Bitbucket RWA repo; Add Bitbucket Pipelines (#771)
* add sync bitbucket github action * add bitbucket-pipelines.yml * update with comment for develop branch * sync on develop * update to use build:ci * sync on dev branch for the moment * add timeout to windows cypress run * bump to 40 min timeout
- Loading branch information
Kevin Old
committed
Feb 23, 2021
1 parent
3412457
commit 45fa125
Showing
4 changed files
with
157 additions
and
1 deletion.
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,46 @@ | ||
# This action mirrors the cypress-realworld-app github repo into a Bitbucket Repo | ||
# github.com/cypress-io/cypress-realworld-app -> bitbucket.org/cypress-io/cypress-realworld-app | ||
|
||
name: Sync Bitbucket over SSH | ||
|
||
on: | ||
push: | ||
branches: | ||
- kevin/bitbucket-pipelines-sync | ||
- develop | ||
|
||
# set the BB_REPO variable to the destination bitbucket workspace name | ||
env: | ||
BB_ROOT: [email protected]:cypress-io | ||
|
||
jobs: | ||
syncbb: | ||
name: Synch from Github to Bitbucket using SSH | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone the github repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install SSH key | ||
uses: shimataro/ssh-key-action@v2 | ||
with: | ||
key: ${{ secrets.BITBUCKET_SSH_KEY }} | ||
name: id_rsa # optional | ||
known_hosts: ${{ secrets.BITBUCKET_KNOWN_HOSTS }} | ||
config: | ||
Host bitbucket.org | ||
User git | ||
IdentityFile ~/.ssh/id_rsa | ||
IdentitiesOnly yes | ||
|
||
- uses: franzdiebold/github-env-vars-action@v2 | ||
- name: sync with bitbucket | ||
run: | | ||
cd $GITHUB_WORKSPACE | ||
# update the entire repo including tags/branches; prune out deleted items | ||
echo sync with $BB_ROOT/$CI_REPOSITORY_NAME | ||
git fetch --prune --unshallow | ||
# make the bitbucket repo a remote called sync | ||
git remote add sync $BB_ROOT/$CI_REPOSITORY_NAME | ||
# force push the sync remote with all changes. | ||
git push --force --set-upstream -v --all sync |
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,109 @@ | ||
image: cypress/browsers:node12.18.3-chrome87-ff82 | ||
|
||
api-tests: &api-tests | ||
name: "API Tests" | ||
caches: | ||
- cypress | ||
- node | ||
script: | ||
- yarn start:ci & npx wait-on http://localhost:3000 | ||
- npx cypress run --record --parallel --browser chrome --group "API" --spec "cypress/tests/api/*" --ci-build-id $BITBUCKET_BUILD_NUMBER | ||
|
||
ui-chrome-tests: &ui-chrome-tests | ||
name: "UI Tests - Chrome" | ||
caches: | ||
- cypress | ||
- node | ||
script: | ||
- yarn start:ci & npx wait-on http://localhost:3000 | ||
- npx cypress run --record --parallel --browser chrome --group "UI - Chrome" --spec "cypress/tests/ui/*" --ci-build-id $BITBUCKET_BUILD_NUMBER | ||
|
||
ui-chrome-tests-mobile: &ui-chrome-tests-mobile | ||
name: "UI Tests - Chrome - Mobile" | ||
caches: | ||
- cypress | ||
- node | ||
script: | ||
- yarn start:ci & npx wait-on http://localhost:3000 | ||
- npx cypress run --record --parallel --browser chrome --group "UI - Chrome - Mobile" --spec "cypress/tests/ui/*" --ci-build-id $BITBUCKET_BUILD_NUMBER --config "viewportWidth=375,viewportHeight=667" | ||
|
||
ui-firefox-tests: &ui-firefox-tests | ||
name: "UI Tests - Firefox" | ||
caches: | ||
- cypress | ||
- node | ||
script: | ||
- yarn start:ci & npx wait-on http://localhost:3000 | ||
- npx cypress run --record --parallel --browser firefox --group "UI - Firefox" --spec "cypress/tests/ui/*" --ci-build-id $BITBUCKET_BUILD_NUMBER | ||
|
||
ui-firefox-tests-mobile: &ui-firefox-tests-mobile | ||
name: "UI Tests - Firefox - Mobile" | ||
caches: | ||
- cypress | ||
- node | ||
script: | ||
- yarn start:ci & npx wait-on http://localhost:3000 | ||
- npx cypress run --record --parallel --browser firefox --group "UI - Firefox - Mobile" --spec "cypress/tests/ui/*" --ci-build-id $BITBUCKET_BUILD_NUMBER --config "viewportWidth=375,viewportHeight=667" | ||
|
||
pipelines: | ||
default: | ||
- step: | ||
name: Install dependencies and build frontend application | ||
caches: | ||
- yarn | ||
- cypress | ||
- node | ||
script: | ||
- yarn install --frozen-lockfile | ||
- yarn types | ||
- yarn test:unit:ci | ||
- yarn build:ci | ||
artifacts: | ||
- build/** | ||
- parallel: | ||
- step: | ||
<<: *api-tests | ||
- step: | ||
<<: *ui-chrome-tests | ||
- step: | ||
<<: *ui-chrome-tests | ||
- step: | ||
<<: *ui-chrome-tests | ||
- step: | ||
<<: *ui-chrome-tests | ||
- step: | ||
<<: *ui-chrome-tests | ||
- step: | ||
<<: *ui-chrome-tests-mobile | ||
- step: | ||
<<: *ui-chrome-tests-mobile | ||
- step: | ||
<<: *ui-chrome-tests-mobile | ||
- step: | ||
<<: *ui-chrome-tests-mobile | ||
- step: | ||
<<: *ui-chrome-tests-mobile | ||
- step: | ||
<<: *ui-firefox-tests | ||
- step: | ||
<<: *ui-firefox-tests | ||
- step: | ||
<<: *ui-firefox-tests | ||
- step: | ||
<<: *ui-firefox-tests | ||
- step: | ||
<<: *ui-firefox-tests | ||
- step: | ||
<<: *ui-firefox-tests-mobile | ||
- step: | ||
<<: *ui-firefox-tests-mobile | ||
- step: | ||
<<: *ui-firefox-tests-mobile | ||
- step: | ||
<<: *ui-firefox-tests-mobile | ||
- step: | ||
<<: *ui-firefox-tests-mobile | ||
definitions: | ||
caches: | ||
yarn: $HOME/.cache | ||
cypress: $HOME/.cache/Cypress |