-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Parking orbits the sfdx-plugin-lwc-test plugin (#50)
- Loading branch information
1 parent
5450da2
commit 9a8bcd0
Showing
33 changed files
with
6,330 additions
and
2,015 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 |
---|---|---|
@@ -1,44 +1,103 @@ | ||
--- | ||
version: 2 | ||
jobs: | ||
build_and_test: | ||
working_directory: ~/sfdx-plugin-lwc-test | ||
|
||
docker: | ||
- image: circleci/node:lts | ||
|
||
steps: | ||
- checkout | ||
|
||
- restore_cache: | ||
keys: | ||
- yarn-v3-{{ checksum "yarn.lock" }} | ||
|
||
- run: | ||
name: Install dependencies | ||
command: yarn | ||
|
||
- run: | ||
name: Build | ||
command: yarn build | ||
|
||
- run: | ||
name: Check License Headers | ||
command: yarn check-license-headers | ||
|
||
- run: | ||
name: Testing | ||
command: yarn test | ||
|
||
- save_cache: | ||
paths: | ||
- ~/.cache/yarn | ||
- yarn.lock | ||
- node_modules | ||
key: yarn-v3-{{ checksum "yarn.lock" }} | ||
|
||
version: 2.1 | ||
orbs: | ||
release-management: salesforce/npm-release-management@4 | ||
parameters: | ||
sfdx_version: | ||
description: | | ||
By default, the latest version of the standalone CLI will be installed. | ||
To install via npm, supply a version tag such as "latest" or "6". | ||
default: '' | ||
type: string | ||
repo_tag: | ||
description: "The tag of the module repo to checkout, '' defaults to branch/PR" | ||
default: '' | ||
type: string | ||
npm_module_name: | ||
description: 'The fully qualified npm module name, i.e. @salesforce/plugins-data' | ||
default: '' | ||
type: string | ||
workflow: | ||
description: | | ||
String that controls which workflow would run. | ||
This parameter is used by automation to determine if a workflow will run | ||
within a pipeline. | ||
type: string | ||
default: 'test-and-release' | ||
workflows: | ||
version: 2 | ||
build_and_test: | ||
test-and-release: | ||
when: | ||
equal: [test-and-release, << pipeline.parameters.workflow >>] | ||
jobs: | ||
- build_and_test | ||
- release-management/validate-pr: | ||
filters: | ||
branches: | ||
ignore: main | ||
- release-management/test-package: | ||
matrix: | ||
parameters: | ||
os: | ||
- linux | ||
- windows | ||
node_version: | ||
# - latest | ||
- lts | ||
- maintenance | ||
exclude: | ||
- os: windows | ||
node_version: maintenance | ||
- release-management/test-nut: | ||
context: na40-auth-url | ||
sfdx_version: latest | ||
node_version: lts | ||
size: large | ||
requires: | ||
- release-management/test-package | ||
no_output_timeout: 30m | ||
matrix: | ||
parameters: | ||
os: | ||
- linux | ||
- windows | ||
command: | ||
- 'yarn test:nuts' | ||
- release-management/release-package: | ||
sign: true | ||
github-release: true | ||
requires: | ||
- release-management/test-package | ||
filters: | ||
branches: | ||
only: main | ||
context: | ||
- CLI_CTC | ||
- AWS | ||
- release | ||
test-ts-update: | ||
when: | ||
equal: [test-ts-update, << pipeline.parameters.workflow >>] | ||
jobs: | ||
- release-management/test-ts-update | ||
just-nuts: | ||
when: | ||
equal: [just-nuts, << pipeline.parameters.workflow >>] | ||
jobs: | ||
- release-management/test-nut: | ||
name: just-nuts-<< matrix.os >> | ||
sfdx_version: << pipeline.parameters.sfdx_version >> | ||
sfdx_executable_path: sfdx | ||
repo_tag: << pipeline.parameters.repo_tag >> | ||
matrix: | ||
parameters: | ||
os: | ||
- linux | ||
- windows | ||
npm_module_name: << pipeline.parameters.npm_module_name >> | ||
context: na40-auth-url | ||
dependabot-automerge: | ||
when: | ||
equal: [dependabot-automerge, << pipeline.parameters.workflow >>] | ||
jobs: | ||
- release-management/dependabot-automerge: | ||
merge-method: squash | ||
context: release |
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,9 @@ | ||
/* | ||
* Copyright (c) 2020, salesforce.com, inc. | ||
* All rights reserved. | ||
* Licensed under the BSD 3-Clause license. | ||
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause | ||
*/ | ||
module.exports = { | ||
extends: ['eslint-config-salesforce-typescript', 'eslint-config-salesforce-license'], | ||
}; |
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,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
yarn commitlint --edit |
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,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
yarn lint && yarn pretty-quick --staged |
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,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
yarn build && yarn test |
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,12 +1,5 @@ | ||
{ | ||
"extension": [ | ||
".ts" | ||
], | ||
"include": [ | ||
"src/**/*.ts" | ||
], | ||
"exclude": [ | ||
"**/*.d.ts" | ||
], | ||
"all": true | ||
"nyc": { | ||
"extends": "@salesforce/dev-config/nyc" | ||
} | ||
} |
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 @@ | ||
"@salesforce/prettier-config" |
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,12 @@ | ||
Copyright (c) 2022, Salesforce.com, Inc. | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: | ||
|
||
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. | ||
|
||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. | ||
|
||
* Neither the name of Salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
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 node | ||
|
||
const oclif = require('@oclif/core'); | ||
|
||
const path = require('path'); | ||
const project = path.join(__dirname, '..', 'tsconfig.json'); | ||
|
||
// In dev mode -> use ts-node and dev plugins | ||
process.env.NODE_ENV = 'development'; | ||
|
||
require('ts-node').register({ project }); | ||
|
||
// In dev mode, always show stack traces | ||
oclif.settings.debug = true; | ||
|
||
// Start the CLI | ||
oclif.run().then(oclif.flush).catch(oclif.Errors.handle); |
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,3 @@ | ||
@echo off | ||
|
||
node "%~dp0\dev" %* |
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,4 +1,5 @@ | ||
#!/usr/bin/env node | ||
|
||
require('@oclif/command').run() | ||
.catch(require('@oclif/errors/handle')) | ||
const oclif = require('@oclif/core'); | ||
|
||
oclif.run().then(require('@oclif/core/flush')).catch(require('@oclif/core/handle')); |
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,71 +1,20 @@ | ||
[ | ||
{ | ||
"command": "commandreference:generate", | ||
"flags": [ | ||
"json", | ||
"loglevel", | ||
"outputdir", | ||
"plugins", | ||
"hidden", | ||
"erroronwarnings" | ||
] | ||
}, | ||
{ | ||
"command": "commands", | ||
"flags": [ | ||
"help", | ||
"json", | ||
"hidden", | ||
"columns", | ||
"sort", | ||
"filter", | ||
"csv", | ||
"output", | ||
"extended", | ||
"no-truncate", | ||
"no-header" | ||
] | ||
}, | ||
{ | ||
"command": "force:lightning:lwc:test:create", | ||
"flags": [ | ||
"json", | ||
"loglevel", | ||
"filepath" | ||
] | ||
}, | ||
{ | ||
"command": "force:lightning:lwc:test:run", | ||
"flags": [ | ||
"json", | ||
"loglevel", | ||
"debug", | ||
"watch" | ||
] | ||
}, | ||
{ | ||
"command": "force:lightning:lwc:test:setup", | ||
"flags": [ | ||
"json", | ||
"loglevel" | ||
] | ||
}, | ||
{ | ||
"command": "help", | ||
"flags": [ | ||
"all" | ||
] | ||
}, | ||
{ | ||
"command": "snapshot:compare", | ||
"flags": [ | ||
"filepath" | ||
] | ||
}, | ||
{ | ||
"command": "snapshot:generate", | ||
"flags": [ | ||
"filepath" | ||
] | ||
} | ||
{ | ||
"command": "force:lightning:lwc:test:create", | ||
"plugin": "@salesforce/sfdx-plugin-lwc-test", | ||
"flags": ["filepath", "json", "loglevel"], | ||
"alias": [] | ||
}, | ||
{ | ||
"command": "force:lightning:lwc:test:run", | ||
"plugin": "@salesforce/sfdx-plugin-lwc-test", | ||
"flags": ["debug", "json", "loglevel", "watch"], | ||
"alias": [] | ||
}, | ||
{ | ||
"command": "force:lightning:lwc:test:setup", | ||
"plugin": "@salesforce/sfdx-plugin-lwc-test", | ||
"flags": ["json", "loglevel"], | ||
"alias": [] | ||
} | ||
] |
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 @@ | ||
module.exports = { extends: ['@commitlint/config-conventional'] }; |
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.