Skip to content

Commit

Permalink
chore: merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
shetzel committed Jan 25, 2024
2 parents 6b6e5e9 + e7c496e commit 25fefb1
Show file tree
Hide file tree
Showing 163 changed files with 9,026 additions and 10,866 deletions.
File renamed without changes.
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
5 changes: 1 addition & 4 deletions .github/workflows/failureNotifications.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
name: failureNotifications

on:
workflow_run:
workflows:
- version, tag and github release
- publish
types:
- completed

jobs:
failure-notify:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- name: Announce Failure
id: slack
uses: slackapi/slack-github-action@v1.21.0
uses: slackapi/slack-github-action@v1.24.0
env:
# for non-CLI-team-owned plugins, you can send this anywhere you like
SLACK_WEBHOOK_URL: ${{ secrets.CLI_ALERTS_SLACK_WEBHOOK }}
Expand Down
36 changes: 0 additions & 36 deletions .github/workflows/manualRelease.yml

This file was deleted.

18 changes: 0 additions & 18 deletions .github/workflows/onPushToMain.yml

This file was deleted.

18 changes: 15 additions & 3 deletions .github/workflows/onRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: publish

on:
release:
types: [released]
types: [published]
# support manual release in case something goes wrong and needs to be repeated or tested
workflow_dispatch:
inputs:
Expand All @@ -11,10 +11,22 @@ on:
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: latest
ctc: true
tag: ${{ needs.getDistTag.outputs.tag || 'latest' }}
githubTag: ${{ github.event.release.tag_name || inputs.tag }}
secrets: inherit
42 changes: 42 additions & 0 deletions .github/workflows/perf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# 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:
cache: yarn
- uses: salesforcecli/github-workflows/.github/actions/yarnInstallWithRetries@main
- run: yarn build
- 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 }}
70 changes: 43 additions & 27 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,48 +14,64 @@ jobs:
windows-unit-tests:
needs: linux-unit-tests
uses: salesforcecli/github-workflows/.github/workflows/unitTestsWindows.yml@main
nuts:
xNuts:
needs: linux-unit-tests
uses: salesforcecli/github-workflows/.github/workflows/externalNut.yml@main
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'windows-latest']
externalProjectGitUrl:
- https://github.com/salesforcecli/plugin-config
- https://github.com/salesforcecli/plugin-alias
- 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-schema
- https://github.com/salesforcecli/plugin-env
- https://github.com/salesforcecli/plugin-org
- https://github.com/salesforcecli/plugin-login
- 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
with:
packageName: '@salesforce/core'
externalProjectGitUrl: ${{ matrix.externalProjectGitUrl }}
command: 'yarn test:nuts'
os: ${{ matrix.os }}
useCache: false
postBuildCommands: 'shx rm -rf node_modules/jsforce/typings'
preExternalBuildCommands: 'shx rm -rf node_modules/@salesforce/sf-plugins-core/node_modules/@salesforce/core'
preSwapCommands: 'yarn upgrade jsforce@beta; npx yarn-deduplicate; yarn install'
preExternalBuildCommands: 'shx rm -rf node_modules/@salesforce/core/node_modules/jsforce shx rm -rf 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 node_modules/@salesforce/apex-node/node_modules/@salesforce/core'
secrets: inherit
# hidden until we fix source-testkit to better handle jwt
# deployRetrieveNuts:
# needs: unit-tests
# uses: salesforcecli/github-workflows/.github/workflows/externalNut.yml@main
# strategy:
# fail-fast: false
# matrix:
# os: ['windows-latest-16x', 'ubuntu-latest-16x']
# command:
# - yarn test:nuts:deploy:metadata:manifest
# - yarn test:nuts:deploy:metadata:metadata
# - yarn test:nuts:deploy:metadata:source-dir
# - yarn test:nuts:deploy:metadata:test-level
# - yarn test:nuts:static
# with:
# packageName: '@salesforce/core'
# externalProjectGitUrl: 'https://github.com/salesforcecli/plugin-deploy-retrieve'
# command: ${{ matrix.command }}
# os: ${{ matrix.os }}
# secrets: inherit
pdrNuts:
needs: linux-unit-tests
uses: salesforcecli/github-workflows/.github/workflows/externalNut.yml@main
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'windows-latest']
command:
- 'yarn test:nuts:convert'
- 'yarn test:nuts:deb'
- 'yarn test:nuts:delete'
- 'yarn test:nuts:deploy:metadata:manifest'
- 'yarn test:nuts:deploy:metadata:metadata'
- 'yarn test:nuts:deploy:metadata:metadata-dir'
- 'yarn test:nuts:deploy:metadata:source-dir'
- 'yarn test:nuts:deploy:metadata:test-level'
- 'yarn test:nuts:destructive'
- 'yarn test:nuts:manifest'
- 'yarn test:nuts:retrieve'
- 'yarn test:nuts:specialTypes'
- 'yarn test:nuts:static'
- 'yarn test:nuts:tracking'
with:
packageName: '@salesforce/core'
externalProjectGitUrl: 'https://github.com/salesforcecli/plugin-deploy-retrieve'
preSwapCommands: 'yarn upgrade jsforce@beta; npx yarn-deduplicate; yarn install'
command: ${{ matrix.command }}
os: ${{ matrix.os }}
preExternalBuildCommands: 'shx rm -rf node_modules/@salesforce/core/node_modules/jsforce shx rm -rf 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'
secrets:
TESTKIT_AUTH_URL: ${{ secrets.TESTKIT_AUTH_URL }}
2 changes: 1 addition & 1 deletion .mocharc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
"watch-files": ["src", "test"],
"recursive": true,
"reporter": "spec",
"timeout": 10000
"timeout": 20000
}
2 changes: 1 addition & 1 deletion .sfdevrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"wireit": {
"compile": {
"command": "ttsc -p . --pretty --incremental",
"command": "tspc -p . --pretty --incremental",
"files": ["src/**/*.ts", "tsconfig.json", "messages", "messageTransformer"],
"output": ["lib/**", "*.tsbuildinfo"],
"clean": "if-file-deleted"
Expand Down
Loading

3 comments on commit 25fefb1

@svc-cli-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logger Benchmarks - ubuntu-latest

Benchmark suite Current: 25fefb1 Previous: 7cb8fe9 Ratio
Child logger creation 478722 ops/sec (±0.51%) 476616 ops/sec (±1.29%) 1.00
Logging a string on root logger 751423 ops/sec (±11.04%) 788221 ops/sec (±6.51%) 1.05
Logging an object on root logger 588834 ops/sec (±9.15%) 603584 ops/sec (±9.84%) 1.03
Logging an object with a message on root logger 12095 ops/sec (±198.38%) 8316 ops/sec (±207.01%) 0.69
Logging an object with a redacted prop on root logger 415602 ops/sec (±9.62%) 461785 ops/sec (±9.52%) 1.11
Logging a nested 3-level object on root logger 368126 ops/sec (±6.31%) 387465 ops/sec (±7.00%) 1.05

This comment was automatically generated by workflow using github-action-benchmark.

@svc-cli-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logger Benchmarks - windows-latest

Benchmark suite Current: 25fefb1 Previous: 7cb8fe9 Ratio
Child logger creation 335703 ops/sec (±0.86%) 316559 ops/sec (±0.92%) 0.94
Logging a string on root logger 797196 ops/sec (±6.22%) 734913 ops/sec (±6.00%) 0.92
Logging an object on root logger 623078 ops/sec (±6.35%) 566267 ops/sec (±4.03%) 0.91
Logging an object with a message on root logger 5360 ops/sec (±211.19%) 13216 ops/sec (±188.13%) 2.47
Logging an object with a redacted prop on root logger 452514 ops/sec (±9.19%) 469408 ops/sec (±6.72%) 1.04
Logging a nested 3-level object on root logger 333832 ops/sec (±4.56%) 321469 ops/sec (±5.82%) 0.96

This comment was automatically generated by workflow using github-action-benchmark.

@svc-cli-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Logger Benchmarks - windows-latest'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 25fefb1 Previous: 7cb8fe9 Ratio
Logging an object with a message on root logger 5360 ops/sec (±211.19%) 13216 ops/sec (±188.13%) 2.47

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.