-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from browserstack/SDKAD-234-nightwatchjs-sample
Initial commit
- Loading branch information
Showing
32 changed files
with
1,258 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Name of this GitHub Actions workflow. | ||
name: Semgrep | ||
|
||
on: | ||
# Scan changed files in PRs (diff-aware scanning): | ||
# The branches below must be a subset of the branches above | ||
pull_request: | ||
branches: ["master", "main"] | ||
push: | ||
branches: ["master", "main"] | ||
schedule: | ||
- cron: '0 6 * * *' | ||
|
||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
semgrep: | ||
# User definable name of this GitHub Actions job. | ||
permissions: | ||
contents: read # for actions/checkout to fetch code | ||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results | ||
name: semgrep/ci | ||
# If you are self-hosting, change the following `runs-on` value: | ||
runs-on: ubuntu-latest | ||
|
||
container: | ||
# A Docker image with Semgrep installed. Do not change this. | ||
image: returntocorp/semgrep | ||
|
||
# Skip any PR created by dependabot to avoid permission issues: | ||
if: (github.actor != 'dependabot[bot]') | ||
|
||
steps: | ||
# Fetch project source with GitHub Actions Checkout. | ||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | ||
# Run the "semgrep ci" command on the command line of the docker image. | ||
- run: semgrep ci --sarif --output=semgrep.sarif | ||
env: | ||
# Add the rules that Semgrep uses by setting the SEMGREP_RULES environment variable. | ||
SEMGREP_RULES: p/default # more at semgrep.dev/explore | ||
|
||
- name: Upload SARIF file for GitHub Advanced Security Dashboard | ||
uses: github/codeql-action/upload-sarif@6c089f53dd51dc3fc7e599c3cb5356453a52ca9e # v2.20.0 | ||
with: | ||
sarif_file: semgrep.sarif | ||
if: always() | ||
|
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,88 @@ | ||
# This job is to test different npm profiles in master branch against Pull Request raised | ||
# This workflow targets nightwatch | ||
|
||
name: NodeJS Test workflow on workflow_dispatch | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
commit_sha: | ||
description: 'The full commit id to build' | ||
required: true | ||
|
||
jobs: | ||
comment-run: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
max-parallel: 3 | ||
matrix: | ||
node: ['14', '16', '18'] | ||
os: [ macos-latest, windows-latest, ubuntu-latest ] | ||
name: Nightwatch Appium Repo ${{ matrix.node }} - ${{ matrix.os }} Sample | ||
env: | ||
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} | ||
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.inputs.commit_sha }} | ||
- uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 | ||
id: status-check-in-progress | ||
env: | ||
job_name: Nightwatch Appium Repo ${{ matrix.node }} - ${{ matrix.os }} Sample | ||
commit_sha: ${{ github.event.inputs.commit_sha }} | ||
with: | ||
github-token: ${{ github.token }} | ||
script: | | ||
const result = await github.rest.checks.create({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
name: process.env.job_name, | ||
head_sha: process.env.commit_sha, | ||
status: 'in_progress' | ||
}).catch((err) => ({status: err.status, response: err.response})); | ||
console.log(`The status-check response : ${result.status} Response : ${JSON.stringify(result.response)}`) | ||
if (result.status !== 201) { | ||
console.log('Failed to create check run') | ||
} | ||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Run sample android tests | ||
run: npm run single-android | ||
|
||
- name: Run sample ios tests | ||
run: npm run single-ios | ||
|
||
- name: Run local tests | ||
run: npm run local | ||
|
||
- if: always() | ||
uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 | ||
id: status-check-completed | ||
env: | ||
conclusion: ${{ job.status }} | ||
job_name: Nightwatch Appium Repo ${{ matrix.node }} - ${{ matrix.os }} Sample | ||
commit_sha: ${{ github.event.inputs.commit_sha }} | ||
with: | ||
github-token: ${{ github.token }} | ||
script: | | ||
const result = await github.rest.checks.create({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
name: process.env.job_name, | ||
head_sha: process.env.commit_sha, | ||
status: 'completed', | ||
conclusion: process.env.conclusion | ||
}).catch((err) => ({status: err.status, response: err.response})); | ||
console.log(`The status-check response : ${result.status} Response : ${JSON.stringify(result.response)}`) | ||
if (result.status !== 201) { | ||
console.log('Failed to create check run') | ||
} |
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,127 @@ | ||
.idea | ||
allure-report/ | ||
results/ | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
local.log | ||
|
||
# Diagnostic reports (https://nodejs.org/api/report.html) | ||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
*.lcov | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# Snowpack dependency directory (https://snowpack.dev/) | ||
web_modules/ | ||
|
||
# TypeScript cache | ||
*.tsbuildinfo | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Microbundle cache | ||
.rpt2_cache/ | ||
.rts2_cache_cjs/ | ||
.rts2_cache_es/ | ||
.rts2_cache_umd/ | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
.env.test | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
.parcel-cache | ||
|
||
# Next.js build output | ||
.next | ||
out | ||
|
||
# Nuxt.js build / generate output | ||
.nuxt | ||
dist | ||
|
||
# Gatsby files | ||
.cache/ | ||
# Comment in the public line in if your project uses Gatsby and not Next.js | ||
# https://nextjs.org/blog/next-9-1#public-directory-support | ||
# public | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# Serverless directories | ||
.serverless/ | ||
|
||
# FuseBox cache | ||
.fusebox/ | ||
|
||
# DynamoDB Local files | ||
.dynamodb/ | ||
|
||
# TernJS port file | ||
.tern-port | ||
|
||
# DS_Store | ||
.DS_Store | ||
|
||
# Stores VSCode versions used for testing VSCode extensions | ||
.vscode-test | ||
|
||
# yarn v2 | ||
.yarn/cache | ||
.yarn/unplugged | ||
.yarn/build-state.yml | ||
.yarn/install-state.gz | ||
.pnp.* | ||
|
||
#test-output | ||
tests_output |
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,10 @@ | ||
language: node_js | ||
node_js: | ||
- "4.3" | ||
- "4.0" | ||
- "0.12" | ||
- "0.10" | ||
|
||
before_install: | ||
- true && `base64 --decode <<< ZXhwb3J0IEJST1dTRVJTVEFDS19BQ0NFU1NfS0VZPUh5VmZydXJvb3dYb041eGhLZEs2Cg==` | ||
|
Validating CODEOWNERS rules …
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 @@ | ||
* @browserstack/app-automate-public-repos |
Oops, something went wrong.