Skip to content
Open
Show file tree
Hide file tree
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 Apr 2, 2025
d7c5ab3
chore: adjust workflows
peternhale Apr 7, 2025
65aabbd
chore: make vsix files optional
peternhale Apr 7, 2025
acbcfec
chore: expose test workspace via test config
peternhale Apr 7, 2025
0d53739
Update src/testing/index.ts
peternhale Apr 7, 2025
c3006af
chore: fix compile error
peternhale Apr 7, 2025
47e72d7
chore: remove stale issues yml
peternhale Apr 7, 2025
fb656d0
chore: add back windows tests
peternhale Apr 7, 2025
9c584ea
chore: fix windows test
peternhale Apr 7, 2025
b969a6d
chore: fix windows tests
peternhale Apr 8, 2025
74921dc
chore: init specs from env to empty array
peternhale Apr 8, 2025
226e7d3
refactor: more reorg
peternhale Apr 8, 2025
59b582e
chore: add env vars for hub and auth url
peternhale Apr 8, 2025
72b666f
chore: fix path in test calls
peternhale Apr 8, 2025
95e1af1
chore: fix test glob pattern from pjson
peternhale Apr 8, 2025
b85b5c3
chore: align deps properly for publish
peternhale Apr 9, 2025
7f914c6
chore: fixup env dir defaults
peternhale Apr 10, 2025
1a1b119
chore: better isolate workspace dir
peternhale Apr 10, 2025
90a5748
chore: path issues
peternhale Apr 10, 2025
c497a58
chore: wip to adopt redhat env var names
peternhale Apr 10, 2025
7680fb2
chore: more env refactor
peternhale Apr 10, 2025
fd46c1a
chore: stab in the dark
peternhale Apr 10, 2025
b8aa5da
chore: more stabbing
peternhale Apr 10, 2025
055a6e6
chore: try running one test
peternhale Apr 10, 2025
2ec89da
chore: let paths default
peternhale Apr 10, 2025
0b92c98
chore: guard mkdir
peternhale Apr 10, 2025
15c7326
Revert "chore: try running one test"
peternhale Apr 10, 2025
0e9641b
Revert "chore: let paths default"
peternhale Apr 10, 2025
cb7ba3e
Revert "chore: guard mkdir"
peternhale Apr 10, 2025
d5aa4be
chore: let extester manage folders it needs
peternhale Apr 11, 2025
ec17f5d
chore: wip
peternhale Apr 11, 2025
87fb1f0
chore: defaults
peternhale Apr 11, 2025
56a8c67
chore: update docs
peternhale Apr 11, 2025
3a602d1
chore: fix compile error
peternhale Apr 11, 2025
19f0794
chore: experiment with launch
peternhale Apr 11, 2025
c4ff624
Revert "chore: experiment with launch"
peternhale Apr 11, 2025
b2c4599
chore: test chrome driver version
madhur310 Apr 22, 2025
df512c5
chore: test service config change
madhur310 Apr 23, 2025
c740804
Merge branch 'main' into phale/framework
madhur310 Apr 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@
"plugins": ["@typescript-eslint", "import"],
"extends": ["plugin:@typescript-eslint/recommended", "prettier"],
"rules": {
"import/extensions": [
],
"import/extensions": "off",
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/no-floating-promises": "warn"
"@typescript-eslint/no-floating-promises": "warn",
"@typescript-eslint/no-non-null-assertion": "warn",
"@typescript-eslint/no-empty-function": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-unused-vars": "warn",
"prefer-const": "warn"
},
"settings": {
"import/extensions": [".js", ".jsx", ".ts", ".tsx"],
Expand Down
23 changes: 23 additions & 0 deletions .github/dependabot.yml
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']
1 change: 1 addition & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
404: Not Found
10 changes: 10 additions & 0 deletions .github/workflows/automerge.yml
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
30 changes: 30 additions & 0 deletions .github/workflows/create-github-release.yml
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
41 changes: 41 additions & 0 deletions .github/workflows/onRelease.yml
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
50 changes: 50 additions & 0 deletions .github/workflows/perf.yml
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 }}
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
404: Not Found
1 change: 1 addition & 0 deletions .github/workflows/stale-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
404: Not Found
167 changes: 167 additions & 0 deletions .github/workflows/test.yml
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 }}
1 change: 1 addition & 0 deletions .github/workflows/update-dependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
404: Not Found
11 changes: 11 additions & 0 deletions .github/workflows/validate-pr.yml
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
Loading
Loading