-
Notifications
You must be signed in to change notification settings - Fork 2
refactor: @W-18185459@ as npm module #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
peternhale
wants to merge
39
commits into
main
Choose a base branch
from
phale/framework
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
d69cf38
refactor: @W-18185459@ as npm module
peternhale d7c5ab3
chore: adjust workflows
peternhale 65aabbd
chore: make vsix files optional
peternhale acbcfec
chore: expose test workspace via test config
peternhale 0d53739
Update src/testing/index.ts
peternhale c3006af
chore: fix compile error
peternhale 47e72d7
chore: remove stale issues yml
peternhale fb656d0
chore: add back windows tests
peternhale 9c584ea
chore: fix windows test
peternhale b969a6d
chore: fix windows tests
peternhale 74921dc
chore: init specs from env to empty array
peternhale 226e7d3
refactor: more reorg
peternhale 59b582e
chore: add env vars for hub and auth url
peternhale 72b666f
chore: fix path in test calls
peternhale 95e1af1
chore: fix test glob pattern from pjson
peternhale b85b5c3
chore: align deps properly for publish
peternhale 7f914c6
chore: fixup env dir defaults
peternhale 1a1b119
chore: better isolate workspace dir
peternhale 90a5748
chore: path issues
peternhale c497a58
chore: wip to adopt redhat env var names
peternhale 7680fb2
chore: more env refactor
peternhale fd46c1a
chore: stab in the dark
peternhale b8aa5da
chore: more stabbing
peternhale 055a6e6
chore: try running one test
peternhale 2ec89da
chore: let paths default
peternhale 0b92c98
chore: guard mkdir
peternhale 15c7326
Revert "chore: try running one test"
peternhale 0e9641b
Revert "chore: let paths default"
peternhale cb7ba3e
Revert "chore: guard mkdir"
peternhale d5aa4be
chore: let extester manage folders it needs
peternhale ec17f5d
chore: wip
peternhale 87fb1f0
chore: defaults
peternhale 56a8c67
chore: update docs
peternhale 3a602d1
chore: fix compile error
peternhale 19f0794
chore: experiment with launch
peternhale c4ff624
Revert "chore: experiment with launch"
peternhale b2c4599
chore: test chrome driver version
madhur310 df512c5
chore: test service config change
madhur310 c740804
Merge branch 'main' into phale/framework
madhur310 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,23 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: 'npm' | ||
directory: '/' | ||
schedule: | ||
interval: 'weekly' | ||
day: 'saturday' | ||
versioning-strategy: 'increase' | ||
labels: | ||
- 'dependencies' | ||
open-pull-requests-limit: 5 | ||
pull-request-branch-name: | ||
separator: '-' | ||
commit-message: | ||
# cause a release for non-dev-deps | ||
prefix: fix(deps) | ||
# no release for dev-deps | ||
prefix-development: chore(dev-deps) | ||
ignore: | ||
- dependency-name: '@salesforce/dev-scripts' | ||
- dependency-name: 'npm-dts' # the latest version not compatible with node v18 | ||
- dependency-name: '*' | ||
update-types: ['version-update:semver-major'] |
This file contains hidden or 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 @@ | ||
404: Not Found |
This file contains hidden or 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 @@ | ||
name: automerge | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '42 2,5,8,11 * * *' | ||
|
||
jobs: | ||
automerge: | ||
uses: salesforcecli/github-workflows/.github/workflows/automerge.yml@main | ||
secrets: inherit |
This file contains hidden or 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,30 @@ | ||
name: create-github-release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- prerelease/** | ||
tags-ignore: | ||
- '*' | ||
workflow_dispatch: | ||
inputs: | ||
prerelease: | ||
type: string | ||
description: 'Name to use for the prerelease: beta, dev, etc. NOTE: If this is already set in the package.json, it does not need to be passed in here.' | ||
|
||
jobs: | ||
release: | ||
uses: salesforcecli/github-workflows/.github/workflows/create-github-release.yml@main | ||
secrets: inherit | ||
with: | ||
prerelease: ${{ inputs.prerelease }} | ||
# If this is a push event, we want to skip the release if there are no semantic commits | ||
# However, if this is a manual release (workflow_dispatch), then we want to disable skip-on-empty | ||
# This helps recover from forgetting to add semantic commits ('fix:', 'feat:', etc.) | ||
skip-on-empty: ${{ github.event_name == 'push' }} | ||
docs: | ||
needs: release | ||
if: github.ref_name == 'main' | ||
uses: salesforcecli/github-workflows/.github/workflows/publishTypedoc.yml@main | ||
secrets: inherit |
This file contains hidden or 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,41 @@ | ||
name: publish | ||
|
||
on: | ||
release: | ||
types: [published] | ||
# support manual release in case something goes wrong and needs to be repeated or tested | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: tag that needs to publish | ||
type: string | ||
required: true | ||
jobs: | ||
# parses the package.json version and detects prerelease tag (ex: beta from 4.4.4-beta.0) | ||
getDistTag: | ||
outputs: | ||
tag: ${{ steps.distTag.outputs.tag }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.release.tag_name || inputs.tag }} | ||
- uses: salesforcecli/github-workflows/.github/actions/getPreReleaseTag@main | ||
id: distTag | ||
|
||
npm: | ||
uses: salesforcecli/github-workflows/.github/workflows/npmPublish.yml@main | ||
needs: [getDistTag] | ||
with: | ||
tag: ${{ needs.getDistTag.outputs.tag || 'latest' }} | ||
githubTag: ${{ github.event.release.tag_name || inputs.tag }} | ||
secrets: inherit | ||
|
||
publish-bundle: | ||
if: ${{ success() && needs.getDistTag.outputs.tag == '' }} | ||
uses: ./.github/workflows/esbuild-publish.yml | ||
needs: [getDistTag, npm] | ||
with: | ||
branch: 'main' | ||
nodeVersion: 'lts/*' | ||
secrets: inherit |
This file contains hidden or 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,50 @@ | ||
# runs some very-large-repo tests (for windows filesystem limits) and commits perf results for comparison | ||
name: perf-tests | ||
on: | ||
push: | ||
branches-ignore: [main, gh-pages] | ||
workflow_dispatch: | ||
|
||
# linux will finish ahead of windows, but prevent other branches/commits from hitting simultaneously | ||
# since we're pushing git commits and there would be conflicts | ||
concurrency: perf-test | ||
|
||
jobs: | ||
perf-tests: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
fail-fast: false | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
cache: 'npm' | ||
|
||
# Install dependencies | ||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Build | ||
run: npm run compile | ||
|
||
- name: Run performance tests | ||
run: npm run test:perf | tee test/perf/output.txt | ||
|
||
# Run `github-action-benchmark` action | ||
- name: Store benchmark result | ||
uses: benchmark-action/github-action-benchmark@5bbce78ef18edf5b96cb2d23e8d240b485f9dc4a | ||
with: | ||
name: Logger Benchmarks - ${{ matrix.os }} | ||
tool: 'benchmarkjs' | ||
output-file-path: test/perf/output.txt | ||
comment-on-alert: true | ||
# Push and deploy GitHub pages branch automatically | ||
# this has a bug where it creates duplicate commits when summary-always and aut-push are both true | ||
# summary-always: true | ||
comment-always: true | ||
benchmark-data-dir-path: perf-${{ runner.os}} | ||
auto-push: true | ||
# github-token: ${{ secrets.SVC_CLI_BOT_GITHUB_TOKEN }} |
CristiCanizales marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or 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 @@ | ||
404: Not Found |
This file contains hidden or 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 @@ | ||
404: Not Found |
This file contains hidden or 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,167 @@ | ||
name: tests | ||
on: | ||
push: | ||
branches-ignore: [main] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
# Check package-lock.json for inconsistencies | ||
package-lock-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
cache: 'npm' | ||
- name: Check package-lock.json | ||
run: | | ||
if grep -q "localhost" package-lock.json; then | ||
echo "ERROR: package-lock.json contains localhost references" | ||
exit 1 | ||
fi | ||
|
||
# Since the Windows unit tests take much longer, we run the linux unit tests first and then run the windows unit tests in parallel with NUTs | ||
linux-unit-tests: | ||
needs: package-lock-check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
cache: 'npm' | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Build, link, and run Linux Unit Tests | ||
run: | | ||
npm run compile | ||
npm test | ||
|
||
windows-unit-tests: | ||
needs: linux-unit-tests | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
cache: 'npm' | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Build | ||
run: npm run compile | ||
- name: Run tests | ||
run: npm run test | ||
|
||
nuts: | ||
needs: linux-unit-tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
cache: 'npm' | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Build | ||
run: npm run compile | ||
- name: Run NUTs | ||
run: npm run test:nuts | ||
|
||
xNuts: | ||
needs: linux-unit-tests | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: ['ubuntu-latest', 'windows-latest'] | ||
externalProjectGitUrl: | ||
- https://github.com/salesforcecli/plugin-apex | ||
- https://github.com/salesforcecli/plugin-auth | ||
- https://github.com/salesforcecli/plugin-community | ||
- https://github.com/salesforcecli/plugin-custom-metadata | ||
- https://github.com/salesforcecli/plugin-data | ||
- https://github.com/salesforcecli/plugin-limits | ||
- https://github.com/salesforcecli/plugin-org | ||
- https://github.com/salesforcecli/plugin-schema | ||
- https://github.com/salesforcecli/plugin-settings | ||
- https://github.com/salesforcecli/plugin-signups | ||
- https://github.com/salesforcecli/plugin-templates | ||
- https://github.com/salesforcecli/plugin-user | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
cache: 'npm' | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Build, link, and test project | ||
run: | | ||
npm run compile | ||
shx rm -rf node_modules/@salesforce/core/node_modules/@jsforce/jsforce-node node_modules/@salesforce/sf-plugins-core/node_modules/@salesforce/core node_modules/@salesforce/cli-plugins-testkit/node_modules/@salesforce/core node_modules/@salesforce/source-tracking/node_modules/@salesforce/core node_modules/@salesforce/source-deploy-retrieve/node_modules/@salesforce/core | ||
npm link ../ | ||
${{ matrix.command }} | ||
env: | ||
TESTKIT_AUTH_URL: ${{ secrets.TESTKIT_AUTH_URL }} | ||
|
||
# PDR plugin tests | ||
pdrNuts: | ||
needs: linux-unit-tests | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: ['ubuntu-latest', 'windows-latest'] | ||
command: | ||
- 'npm run test:nuts:convert' | ||
- 'npm run test:nuts:deb' | ||
- 'npm run test:nuts:delete' | ||
- 'npm run test:nuts:deploy:metadata:manifest' | ||
- 'npm run test:nuts:deploy:metadata:metadata' | ||
- 'npm run test:nuts:deploy:metadata:metadata-dir' | ||
- 'npm run test:nuts:deploy:metadata:source-dir' | ||
- 'npm run test:nuts:deploy:metadata:test-level' | ||
- 'npm run test:nuts:destructive' | ||
- 'npm run test:nuts:manifest' | ||
- 'npm run test:nuts:retrieve' | ||
- 'npm run test:nuts:specialTypes' | ||
- 'npm run test:nuts:static' | ||
- 'npm run test:nuts:tracking' | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
cache: 'npm' | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Build | ||
run: npm run compile | ||
- name: Prepare test environment | ||
run: | | ||
npm update @jsforce/jsforce-node@latest | ||
npm install | ||
- name: Clone deploy-retrieve plugin | ||
run: | | ||
git clone https://github.com/salesforcecli/plugin-deploy-retrieve external-project | ||
cd external-project | ||
npm ci | ||
npm run compile | ||
shx rm -rf node_modules/@salesforce/core/node_modules/@jsforce/jsforce-node node_modules/@salesforce/sf-plugins-core/node_modules/@salesforce/core node_modules/@salesforce/cli-plugins-testkit/node_modules/@salesforce/core node_modules/@salesforce/source-tracking/node_modules/@salesforce/core node_modules/@salesforce/source-deploy-retrieve/node_modules/@salesforce/core | ||
npm link ../ | ||
${{ matrix.command }} | ||
env: | ||
TESTKIT_AUTH_URL: ${{ secrets.TESTKIT_AUTH_URL }} | ||
CristiCanizales marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or 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 @@ | ||
404: Not Found |
This file contains hidden or 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,11 @@ | ||
name: pr-validation | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened, edited] | ||
# only applies to PRs that want to merge to main | ||
branches: [main] | ||
|
||
jobs: | ||
pr-validation: | ||
uses: salesforcecli/github-workflows/.github/workflows/validatePR.yml@main |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.