Skip to content

Commit

Permalink
refactor: move script to perf folder
Browse files Browse the repository at this point in the history
  • Loading branch information
scolladon committed Jul 21, 2023
1 parent 3b86396 commit bfc3e21
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/on-main-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
with:
ref: 'e2e/head'
fetch-depth: 0
path: ./e2e
path: ./sgd-e2e

- name: Setup node
uses: actions/setup-node@v3
Expand Down Expand Up @@ -135,15 +135,15 @@ jobs:
sfdx plugins
- name: Run benchmark
working-directory: ./plugin/__tests__/perf
run: node bench.js | tee output.txt
working-directory: ./plugin
run: yarn test:perf

- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
name: Benchmark.js Benchmark
tool: 'benchmarkjs'
output-file-path: ./plugin/__tests__/perf/output.txt
output-file-path: ./plugin/perf-result.txt
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
alert-threshold: '130%'
Expand Down
2 changes: 1 addition & 1 deletion __tests__/perf/bench.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const suite = new Benchmark.Suite()
suite
.add('e2e-test', () => {
execCmd(
'sfdx sgd:source:delta --from "origin/e2e/base" --to "origin/e2e/head" --output expected --generate-delta --repo ../../../e2e',
'sgd:source:delta --from "origin/e2e/base" --to "origin/e2e/head" --output ../sgd-e2e/expected --generate-delta --repo ../sgd-e2e',
{
ensureExitCode: 0,
}
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"homepage": "https://github.com/scolladon/sfdx-git-delta#readme",
"scripts": {
"analysis": "codeclimate analyze",
"clean": "shx rm -rf lib 'reports/*' .nyc_output oclif.manifest.json package.tgz 'sfdx-git-delta-v*.tgz' 'stderr*.txt' 'stdout*.txt' '.stryker-tmp/*'",
"clean": "shx rm -rf lib 'reports/*' .nyc_output oclif.manifest.json package.tgz 'sfdx-git-delta-v*.tgz' 'stderr*.txt' 'stdout*.txt' '.stryker-tmp/*' perf-result.txt",
"increment:apiversion": "bash ./tooling/incrementApiVersion.sh",
"lint": "eslint src/",
"lint:dependencies": "depcheck",
Expand All @@ -49,6 +49,7 @@
"test:build:local": "yarn clean ; shx rm -rf .yarn/cache node_modules ; yarn && yarn pack && yarn test",
"test:mutation": "stryker run",
"test:nut": "nyc mocha **/*.nut.ts",
"test:perf": "node __tests__/perf/bench.js | tee perf-result.txt",
"test:unit": "jest",
"test:unit:clear:cache": "jest --clearCache",
"test:unit:coverage": "jest --coverage",
Expand Down

0 comments on commit bfc3e21

Please sign in to comment.