-
Notifications
You must be signed in to change notification settings - Fork 2k
feat: CodSpeed Benchmarks #4243
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
base: 17.x.x-before-rebase-on-16.x.x
Are you sure you want to change the base?
Changes from 22 commits
114d936
016acb6
ccf912d
3b899ec
06734cf
fe41a4c
71a3028
dd0629f
1425baa
64729f8
9c713c9
badafc1
e43ff47
e1f79a2
ef74c7d
3c83dfd
d88e025
9c771c0
b5b3049
04fa980
6c49c41
8eb26fb
0cc1c05
0574c6b
680b88d
db809ec
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,3 +10,6 @@ | |
|
|
||
| # Ignore TS files inside integration test | ||
| /integrationTests/ts/*.ts | ||
|
|
||
| # Ignore config files | ||
| /vitest.config.ts | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -49,16 +49,18 @@ jobs: | |
| uses: actions/checkout@v4 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Check if commit contains files that should be ignored | ||
| run: | | ||
| git clone --depth 1 https://github.com/github/gitignore.git | ||
|
|
||
| rm gitignore/Global/ModelSim.gitignore | ||
| rm gitignore/Global/Images.gitignore | ||
| cat gitignore/Node.gitignore gitignore/Global/*.gitignore > all.gitignore | ||
|
|
||
| IGNORED_FILES=$(git ls-files --cached --ignored --exclude-from=all.gitignore) | ||
| IGNORED_FILES_UNPROCESSED=$(git ls-files --cached --ignored --exclude-from=all.gitignore) | ||
| IGNORED_FILES=$(grep -v -F "patches/@codspeed+core+3.1.1.patch" <<< "$IGNORED_FILES_UNPROCESSED" || true) | ||
| IGNORED_FILES=$(grep -v -F "patches/@codspeed+vitest-plugin+3.1.1.patch" <<< "$IGNORED_FILES_UNPROCESSED" || true) | ||
|
|
||
| echo "IGNORED_FILES: $IGNORED_FILES" | ||
|
Comment on lines
+59
to
+63
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can revert this as soon as |
||
| if [[ "$IGNORED_FILES" != "" ]]; then | ||
| echo -e "::error::Please remove these files:\n$IGNORED_FILES" | sed -z 's/\n/%0A/g' | ||
| exit 1 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| name: CodSpeed Benchmarks | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - 'main' # or "master" | ||
| pull_request: | ||
| # `workflow_dispatch` allows CodSpeed to trigger backtest | ||
| # performance analysis in order to generate initial data. | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| benchmarks: | ||
| name: Run benchmarks | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: 'actions/checkout@v4' | ||
| - uses: 'actions/setup-node@v3' | ||
| - name: Install dependencies | ||
| run: npm install | ||
| - name: Run benchmarks | ||
| uses: CodSpeedHQ/action@v3 | ||
| env: | ||
| CODSPEED_FORCE_OPTIMIZATION: true | ||
| with: | ||
| run: npm exec vitest bench | ||
| token: ${{ secrets.CODSPEED_TOKEN }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,9 @@ ignorePaths: | |
| - package.json | ||
| - benchmark/github-schema.graphql | ||
| - benchmark/github-schema.json | ||
| - patches | ||
| - src/__benchmarks__/github-schema.json | ||
| - src/__benchmarks__/github-schema.graphql | ||
|
Comment on lines
+11
to
+12
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could merge these two with the existing benchmark resource files into a shared folder |
||
| overrides: | ||
| - filename: '**/docs-old/APIReference-*.md' | ||
| ignoreRegExpList: ['/href="[^"]*"/'] | ||
|
|
@@ -34,7 +37,7 @@ ignoreRegExpList: | |
|
|
||
| words: | ||
| - graphiql | ||
|
|
||
| - codspeed | ||
| # Different names used inside tests | ||
| - Skywalker | ||
| - Leia | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to wait until these patches are published