-
Notifications
You must be signed in to change notification settings - Fork 6
chore: add basic test to ci #80
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
Open
maceip
wants to merge
7
commits into
main
Choose a base branch
from
local-ci-addtest
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
c046c98
add ci test
maceip a08447d
Update .github/workflows/ci.yml
maceip e833b65
Update .github/workflows/ci.yml
maceip c4a0e01
Update ci.yml
maceip 506536d
Apply suggestion from @coderabbitai[bot]
michiosw e4bd792
Apply suggestion from @coderabbitai[bot]
michiosw ce685a3
Merge branch 'main' into local-ci-addtest
maceip 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 |
|---|---|---|
|
|
@@ -25,13 +25,6 @@ jobs: | |
| with: | ||
| node-version: 20 | ||
| cache: 'pnpm' | ||
|
|
||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
|
|
||
| - name: Build packages | ||
| run: pnpm build | ||
|
|
||
| - name: Run linting | ||
| run: pnpm lint | ||
|
|
||
|
|
@@ -42,4 +35,58 @@ jobs: | |
| run: pnpm format:check | ||
|
|
||
| - name: Run tests | ||
| run: pnpm test | ||
| run: pnpm test | ||
|
|
||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
|
|
||
| test-macos: | ||
| needs: quality # optional | ||
| runs-on: macos-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v3 | ||
| - uses: pnpm/action-setup@v4 | ||
| with: | ||
| version: 10.12.1 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 20 | ||
| cache: 'pnpm' | ||
| - run: pnpm install --frozen-lockfile | ||
|
|
||
| - name: Build mac DMG | ||
| env: | ||
| APPLE_ID: ${{ secrets.APPLE_ID }} | ||
| APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }} | ||
| APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | ||
| CSC_LINK: ${{ secrets.CSC_LINK }} | ||
| CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} | ||
| NODE_ENV: production | ||
| GH_TOKEN: ${{ secrets.RELEASE_PAT || secrets.GITHUB_TOKEN }} | ||
| PUBLISH_RELEASE: false | ||
| run: pnpm --filter vibe build:mac | ||
|
|
||
| - name: Mount DMG | ||
| run: hdiutil attach apps/electron-app/dist/vibe-*.dmg | ||
| - name: Install App | ||
| run: | | ||
| sudo cp -R "/Volumes/COBROWSER/vibe.app" /Applications/ | ||
| - name: Run App and Check for Errors | ||
|
Comment on lines
+70
to
+75
Contributor
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. 🛠️ Refactor suggestion Hard-coded DMG path is brittle & mount is never detached
-run: hdiutil attach apps/electron-app/dist/vibe-*.dmg
+run: |
+ DMG_PATH=$(fd --full-path -e dmg '^vibe-.*\.dmg$' apps | head -n1)
+ hdiutil attach "$DMG_PATH"
- - name: Install App
- run: |
- sudo cp -R "/Volumes/COBROWSER/vibe.app" /Applications/
+ - name: Install App
+ run: |
+ VOLUME="/Volumes/COBROWSER"
+ sudo cp -R "$VOLUME/vibe.app" /Applications/
+ hdiutil detach "$VOLUME"
🤖 Prompt for AI Agents |
||
| run: | | ||
| set +e | ||
| /Applications/vibe.app/Contents/MacOS/vibe &> app_output.log & | ||
| APP_PID=$! | ||
| sleep 10 | ||
| kill $APP_PID | ||
| if grep -i "error" app_output.log; then | ||
| echo "Error found in application output." | ||
| exit 1 | ||
| fi | ||
| set -e | ||
| - name: Upload App Logs | ||
| if: always() | ||
| uses: actions/upload-artifact@v3 | ||
| with: | ||
| name: app-logs | ||
| path: app_output.log | ||
michiosw marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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.
Uh oh!
There was an error while loading. Please reload this page.