-
Notifications
You must be signed in to change notification settings - Fork 2
ci: add workflows to build and test demos #13
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
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
8b5ffc3
ci: add workflows to build and test demos
BugenZhao 01acf15
run on pr to other branches
BugenZhao 7750e5f
sync first
BugenZhao b283ced
fix install rw
BugenZhao a57b25a
fix install again
BugenZhao d280d7b
specify locked through env
BugenZhao ba0ac3c
remove python version env
BugenZhao 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,36 @@ | ||
| name: Build | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
|
|
||
| env: | ||
| UV_LOCKED: true | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: ["3.9", "3.10", "3.11", "3.12"] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Prepare uv and Python | ||
| uses: astral-sh/setup-uv@v5 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
|
|
||
| - name: Sync environment | ||
| run: | | ||
| uv sync | ||
|
|
||
| - name: Build package | ||
| run: | | ||
| uv build | ||
|
|
||
| - name: Verify build artifacts | ||
| run: | | ||
| ls -la dist/ | ||
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,44 @@ | ||
| name: Run Demos | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
|
|
||
| env: | ||
| UV_LOCKED: true | ||
|
|
||
| jobs: | ||
| test-demos: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| demo: ["simple", "boll"] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Prepare uv and Python | ||
| uses: astral-sh/setup-uv@v5 | ||
|
|
||
| # TODO: use docker image with diffrent versions of RisingWave | ||
| - name: Install RisingWave | ||
| run: | | ||
| mkdir -p /opt/risingwave | ||
| cd /opt/risingwave | ||
| curl -L https://risingwave.com/sh | sh | ||
| echo "/opt/risingwave" >> $GITHUB_PATH | ||
|
|
||
| - name: Run demo (smoke test) | ||
| run: | | ||
| # Run the demo with a timeout to prevent it from running indefinitely | ||
| timeout 30s uv run examples/demo.py ${{ matrix.demo }} || code=$? | ||
| if [ $code -eq 124 ]; then | ||
| # If the command timed out (code 124), that's expected since the demo runs continuously | ||
| echo "Demo ran successfully for 30 seconds" | ||
| exit 0 | ||
| else | ||
| # Any other exit code indicates a failure | ||
| echo "Demo exited with code $code" | ||
| exit $code | ||
| fi |
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
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.
To ensure
uv.lockis up to date.