generated from cloudwego/.github
-
Couldn't load subscription status.
- Fork 33
feat: regression testing #73
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
f240b07
feat: split lsp. prepare for fix
Hoblovski 458e1ba
fix: improve tests
Hoblovski c17ecad
fix: remove duplicate copyright
Hoblovski 046f387
fix: rust0 didnt compile
Hoblovski f22aba5
fix: unstable CI due to insufficient sleep
Hoblovski 36683ad
feat: run all tests in parallel
Hoblovski c5771c7
feat: scripts for regression testing
Hoblovski d60b73b
feat: regression CI
Hoblovski b2172bb
fix: allow run_all_testdata to be run from anywhere
Hoblovski 21b8965
fix: fix regression CI
Hoblovski ca872e9
fix: fix nits from review
Hoblovski File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| name: Regression Test | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| branches: | ||
| - main | ||
|
|
||
| jobs: | ||
| run_all_tests: | ||
| runs-on: ubuntu-latest | ||
| #if: "!contains(github.event.pull_request.title, '[NO-REGRESSION-TEST]')" | ||
| steps: | ||
| - name: Setup Go environment | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version: '1.22' | ||
|
|
||
| - name: Setup Rust toolchain | ||
| uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| toolchain: stable | ||
| components: rust-analyzer | ||
|
|
||
| - name: Setup Python environment | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.11' | ||
|
|
||
| - name: Checkout pull request code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| path: 'pr_repo' | ||
| submodules: true | ||
|
|
||
| - name: Install Python dependencies | ||
| run: | | ||
| pip install -r ./pr_repo/script/requirements.txt | ||
| pip install ./pr_repo/pylsp | ||
|
|
||
| - name: Checkout main branch code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: 'main' | ||
| path: 'main_repo' | ||
|
|
||
| - name: Compile both binaries | ||
| run: | | ||
| (cd main_repo && go build -o ../abcoder_old) | ||
| (cd pr_repo && go build -o ../abcoder_new) | ||
|
|
||
| - name: Run test scripts and generate outputs | ||
| run: | | ||
| LANGS="go rust python" OUTDIR=out_old ABCEXE=./abcoder_old ./pr_repo/script/run_all_testdata.sh | ||
| LANGS="go rust python" OUTDIR=out_new ABCEXE=./abcoder_new ./pr_repo/script/run_all_testdata.sh | ||
|
|
||
| - name: Compare outputs and check for regression | ||
| id: diff_check | ||
| run: ./pr_repo/script/diffjson.py out_old out_new | ||
| continue-on-error: true | ||
|
|
||
| - name: Upload output directories | ||
| uses: actions/upload-artifact@v4 | ||
| if: always() | ||
| with: | ||
| name: regression-outputs | ||
| path: | | ||
| out_old | ||
| out_new | ||
| retention-days: 3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
这里包了一层,本来是想做 retry on empty response (就不用 sleep 等 lsp 了)的,但是发现实在做不了,只能 sleep。
不过包一层也方便以后做 unified transparent LSP request caching