From f9516d3cc8fe15e94c8fe1f40c0d692421183122 Mon Sep 17 00:00:00 2001 From: Arihant Jain Date: Tue, 12 Oct 2021 12:46:24 +0530 Subject: [PATCH 1/3] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 000000000..600c7e3c4 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,28 @@ +# Node.js +# Build a general Node.js project with npm. +# Add steps that analyze code, save build artifacts, deploy, and more: +# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript + +trigger: +- master + +pool: + vmImage: ubuntu-latest + +steps: +- task: NodeTool@0 + inputs: + versionSpec: '10.x' + displayName: 'Install Node.js' + +- task: BrowserStackConfig@0 + inputs: + BrowserStackServiceEndPoint: 'BrowserStack Connection' +- script: | + npm install + npm run single + displayName: 'npm install and run on bs' + +- task: BrowserStackResults@1 + inputs: + browserstackProduct: 'automate' From df6fcdb24675b7fdbed99b2a55c1ad7a16f37d15 Mon Sep 17 00:00:00 2001 From: Arihant Jain Date: Tue, 12 Oct 2021 17:28:21 +0530 Subject: [PATCH 2/3] changed build name to env variable --- conf/local.conf.js | 2 +- conf/parallel.conf.js | 2 +- conf/single.conf.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/local.conf.js b/conf/local.conf.js index 880cee9b6..6b9de03fe 100644 --- a/conf/local.conf.js +++ b/conf/local.conf.js @@ -13,7 +13,7 @@ exports.config = { capabilities: [{ browserName: 'chrome', name: 'local_test', - build: 'browserstack-build-1', + build: process.env.BROWSERSTACK_BUILD_NAME || 'browserstack-build-1', 'browserstack.local': true }], diff --git a/conf/parallel.conf.js b/conf/parallel.conf.js index 7ae951e9c..0086cd05d 100644 --- a/conf/parallel.conf.js +++ b/conf/parallel.conf.js @@ -11,7 +11,7 @@ exports.config = { maxInstances: 10, commonCapabilities: { name: 'parallel_test', - build: 'browserstack-build-1' + build: process.env.BROWSERSTACK_BUILD_NAME || 'browserstack-build-1' }, capabilities: [{ diff --git a/conf/single.conf.js b/conf/single.conf.js index 6cc0b8e1b..2e2cb29c3 100644 --- a/conf/single.conf.js +++ b/conf/single.conf.js @@ -11,7 +11,7 @@ exports.config = { capabilities: [{ browserName: 'Chrome', name: 'single_test', - build: 'browserstack-build-1' + build: process.env.BROWSERSTACK_BUILD_NAME || 'browserstack-build-1' }], logLevel: 'warn', From cd2a3fce7596bc01245b5785c2c6ac073ce62e14 Mon Sep 17 00:00:00 2001 From: Arihant Jain Date: Tue, 12 Oct 2021 17:33:46 +0530 Subject: [PATCH 3/3] added a mobile device --- conf/single.conf.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/conf/single.conf.js b/conf/single.conf.js index 2e2cb29c3..c7a0da98f 100644 --- a/conf/single.conf.js +++ b/conf/single.conf.js @@ -9,7 +9,10 @@ exports.config = { exclude: [], capabilities: [{ - browserName: 'Chrome', + os_version : "14", + device : "iPhone 12", + real_mobile : "true", + browserName : "iPhone", name: 'single_test', build: process.env.BROWSERSTACK_BUILD_NAME || 'browserstack-build-1' }],