Skip to content
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

build: fix perf test execution #846

Merged
merged 3 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
22 changes: 8 additions & 14 deletions .github/workflows/on-main-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,24 +69,16 @@ jobs:
with:
node-version: 18

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "yarn-cache=$(yarn config get cacheFolder)" >> "$GITHUB_OUTPUT"
shell: bash

- uses: actions/cache@v4
with:
path: ${{ steps.yarn-cache-dir-path.outputs.yarn-cache }}
key: ${{ runner.os }}-16-yarn-${{ hashFiles('**/yarn.lock') }}
- name: Setup dependencies, cache and install
uses: ./.github/actions/install

- name: Install dependencies
run: yarn install --immutable --check-cache
- uses: google/wireit@setup-github-actions-caching/v1

- name: Build plugin
run: yarn pack

- name: Install sfdx-cli
run: npm install -g sfdx-cli
- name: Install salesforce CLI
run: npm install -g @salesforce/cli

- name: Install plugin
run: |
Expand All @@ -102,7 +94,9 @@ jobs:
path: ./e2e

- name: Run benchmark
run: yarn test:perf
run: |
yarn test:perf
git reset --hard

- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/on-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
uses: ./.github/actions/install

- name: Lint commits
uses: wagoid/commitlint-github-action@v5
uses: wagoid/commitlint-github-action@v6
env:
NODE_PATH: ${{ github.workspace }}/node_modules
continue-on-error: true
Expand Down
23 changes: 19 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"test:build": "yarn clean ; shx rm -rf .yarn/cache node_modules ; yarn && yarn pack && yarn test",
"test:mutation": "wireit",
"test:nut": "wireit",
"test:perf": "node __tests__/perf/bench.mjs > perf-result.txt && shx cat perf-result.txt",
"test:perf": "wireit",
"test:unit": "wireit",
"test:unit:debug": "node --inspect node_modules/.bin/jest",
"test:unit:debug:break": "node --inspect-brk node_modules/.bin/jest",
Expand Down Expand Up @@ -127,6 +127,21 @@
"test:nut"
]
},
"test:perf": {
"command": "node __tests__/perf/bench.mjs > perf-result.txt && shx cat perf-result.txt",
"files": [
"src/**/*.ts",
"test/**/*.ts",
"messages/**",
"**/tsconfig.json"
],
"output": [
"perf-result.txt"
],
"dependencies": [
"build"
]
},
"test:mutation": {
"command": "stryker run",
"files": [
Expand Down Expand Up @@ -174,7 +189,7 @@
}
},
"devDependencies": {
"@commitlint/cli": "^19.2.2",
"@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2",
"@jest/globals": "^29.7.0",
"@oclif/dev-cli": "^1.26.10",
Expand All @@ -183,7 +198,7 @@
"@salesforce/ts-sinon": "^1.4.19",
"@stryker-mutator/core": "^8.2.6",
"@stryker-mutator/jest-runner": "^8.2.6",
"@swc/core": "^1.4.16",
"@swc/core": "^1.4.17",
"@types/async": "^3.2.24",
"@types/jest": "^29.5.12",
"@types/mocha": "^10.0.6",
Expand All @@ -198,7 +213,7 @@
"eslint-plugin-prettier": "^5.1.3",
"husky": "^9.0.11",
"jest": "^29.7.0",
"knip": "^5.9.4",
"knip": "^5.10.0",
"lint-staged": "^15.2.2",
"mocha": "^10.4.0",
"nyc": "^15.1.0",
Expand Down
Loading
Loading