Skip to content

Instantly share code, notes, and snippets.

@roopakv
Last active September 20, 2019 18:19
Show Gist options
  • Save roopakv/0a1f73eedd5cd59a628ea545842c7920 to your computer and use it in GitHub Desktop.
Save roopakv/0a1f73eedd5cd59a628ea545842c7920 to your computer and use it in GitHub Desktop.
version: 2.1
orbs:
swissknife: roopakv/swissknife@0.8.0
# These parameters are used to run various workflows via the API and
# are not used directly for every PR. by setting the below params
# we can for example run only staging integration tests.
parameters:
run_base_tests:
type: boolean
default: true
run_cdstaging_integration_tests:
type: boolean
default: false
run_staging_integration_tests:
type: boolean
default: false
run_sandbox_integration_tests:
type: boolean
default: false
run_production_integration_tests:
type: boolean
default: false
workflows:
# This workflow is run on master changes merged to this repo
build:
when: << pipeline.parameters.run_base_tests >>
jobs:
- test-on-chrome:
name: Staging on local chrome
context: integration-tests-staging-context
- test-on-chrome:
name: Sandbox on local chrome
context: integration-tests-sandbox-context
- test-api:
name: Staging API
context: integration-tests-staging-context
staging-local-chrome:
when: << pipeline.parameters.run_cdstaging_integration_tests >>
jobs:
- test-on-chrome:
name: Staging on local chrome
context: integration-tests-staging-context
# This workflow is triggered via the API to run tests against the
# staging environment on browserstack and local chrome.
staging:
when: << pipeline.parameters.run_staging_integration_tests >>
jobs:
- swissknife/queue_up_workflow:
max-wait-time: "1800"
workflow-name: "^(staging|production|sandbox)$"
- test-on-chrome:
name: Staging on local chrome
context: integration-tests-staging-context
- bs-base:
name: Staging BS base tests
context: integration-tests-staging-context
requires:
- swissknife/queue_up_workflow
- bs-shopify:
name: Staging BS shopify tests
context: integration-tests-staging-context
requires:
- swissknife/queue_up_workflow
- bs-bigcommerce:
name: Staging BS bigcommerce tests
context: integration-tests-staging-context
requires:
- swissknife/queue_up_workflow
- test-api:
name: Staging API
context: integration-tests-staging-context
# This workflow is triggered via the API to run tests against the
# sandbox environment on browserstack and local chrome.
sandbox:
when: << pipeline.parameters.run_sandbox_integration_tests >>
jobs:
- swissknife/queue_up_workflow:
max-wait-time: "1800"
workflow-name: "^(staging|production|sandbox)$"
- test-on-chrome:
name: Sandbox on local chrome
context: integration-tests-sandbox-context
- bs-base:
name: Sandbox BS Base tests
context: integration-tests-sandbox-context
requires:
- swissknife/queue_up_workflow
- bs-shopify:
name: Sandbox BS Shopify tests
context: integration-tests-sandbox-context
requires:
- swissknife/queue_up_workflow
- bs-bigcommerce:
name: Sandbox BS bigcommerce tests
context: integration-tests-sandbox-context
requires:
- swissknife/queue_up_workflow
- bs-woocommerce:
name: Sandbox BS woocommerce tests
context: integration-tests-sandbox-context
requires:
- swissknife/queue_up_workflow
- bs-miva:
name: Sandbox BS miva tests
context: integration-tests-sandbox-context
requires:
- swissknife/queue_up_workflow
- bs-magento1:
name: Sandbox BS magento1 tests
context: integration-tests-sandbox-context
requires:
- swissknife/queue_up_workflow
- bs-magento2:
name: Sandbox BS magento2 tests
context: integration-tests-sandbox-context
requires:
- swissknife/queue_up_workflow
# This workflow is triggered via the API to run tests against the
# production environment on browserstack and local chrome.
production:
when: << pipeline.parameters.run_production_integration_tests >>
jobs:
- swissknife/queue_up_workflow:
max-wait-time: "1800"
workflow-name: "^(staging|production|sandbox)$"
- test-on-chrome:
name: Prod on local chrome
context: integration-tests-production-context
- bs-base:
name: Prod BS Base tests
context: integration-tests-production-context
requires:
- swissknife/queue_up_workflow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment