-
Notifications
You must be signed in to change notification settings - Fork 19
[MOO-1887] Improve "Start runtime" and upgrade config #293
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 17 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
2729cd8
Use API 35
NikolaSimsic ae2d6df
Update all android screenshots
NikolaSimsic 078b33d
Use SKD 36
NikolaSimsic af8ebb0
Use SDK 35
NikolaSimsic b47e79a
Update screenshot
NikolaSimsic 5782004
Cache tool setup to save resources
NikolaSimsic 7a4d2d9
Remove scripts/test/e2e-native.js
NikolaSimsic 001a493
Use nick-fields@retry action for Start Runtime
NikolaSimsic 9498b8e
Add caching into 'Start runtime'
NikolaSimsic e9ce8d6
Add wait time for Clipboard test before image
NikolaSimsic 902e40d
Add name for specific run
NikolaSimsic 7297706
Trigger on PR
NikolaSimsic 0c706e2
Refactor tooling setup
NikolaSimsic 206a1a8
Move not used code into separate action
NikolaSimsic f88d25f
Refactor archiving results
NikolaSimsic 3718f4c
Merge branch 'main' into moo/MOO-1887-resolve-left-issues
NikolaSimsic f8c9611
Update SP version
NikolaSimsic 0a72179
Merge branch 'main' into moo/MOO-1887-resolve-left-issues
NikolaSimsic d79a8b1
Resolve review findings
NikolaSimsic 3ca419f
Update screenshots
NikolaSimsic 4df7b0d
Avoid using iOS 26.0 in workflow
NikolaSimsic 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,40 @@ | ||
| name: Archive Test Results | ||
| description: Archive runtime logs, screenshots, and artifacts from test runs | ||
| inputs: | ||
| platform: | ||
| description: Platform (android or ios) | ||
| required: true | ||
| test-type: | ||
| description: Test type (widget name or js-actions) | ||
| required: true | ||
| workspace-path: | ||
| description: Workspace path for artifacts | ||
| required: false | ||
| default: ${{ github.workspace }} | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Archive runtime logs | ||
| uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 #v4 | ||
| if: always() | ||
| with: | ||
| name: ${{ inputs.platform }}-runtime-logs-${{ inputs.test-type }} | ||
| path: log/*.log | ||
| if-no-files-found: ignore | ||
|
|
||
| - name: Archive test screenshots | ||
| uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 #v4 | ||
| if: always() | ||
| with: | ||
| name: ${{ inputs.platform }}-screenshots-${{ inputs.test-type }} | ||
| path: ${{ inputs.workspace-path }}/maestro/images/actual/${{ inputs.platform }}/**/*.png | ||
| if-no-files-found: ignore | ||
|
|
||
| - name: Archive artifacts | ||
| uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 #v4 | ||
| if: always() | ||
| with: | ||
| name: ${{ inputs.platform }}-artifacts-${{ inputs.test-type }} | ||
| path: packages/pluggableWidgets/**/artifacts/ | ||
| if-no-files-found: ignore |
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,21 @@ | ||
| name: 'Setup Maestro' | ||
| description: 'Install and cache Maestro' | ||
| runs: | ||
| using: 'composite' | ||
| steps: | ||
| - name: "Cache Maestro" | ||
| uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4 | ||
| with: | ||
| path: $HOME/.local/bin/maestro | ||
| key: maestro-${{ runner.os }}-v1 | ||
|
|
||
| - name: "Install Maestro" | ||
| shell: bash | ||
| run: | | ||
| if [ ! -f "$HOME/.local/bin/maestro/bin/maestro" ]; then | ||
| mkdir -p $HOME/.local/bin | ||
| curl -L "https://github.com/mobile-dev-inc/maestro/releases/latest/download/maestro.zip" -o maestro.zip | ||
| unzip maestro.zip -d $HOME/.local/bin | ||
| chmod +x $HOME/.local/bin/maestro/bin/maestro | ||
| fi | ||
| echo "$HOME/.local/bin" >> $GITHUB_PATH | ||
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,28 @@ | ||
| name: 'Setup Node with Cached Dependencies' | ||
| description: 'Set up Node.js and install dependencies with caching' | ||
| runs: | ||
| using: 'composite' | ||
| steps: | ||
| - name: "Set up node" | ||
| uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4 | ||
| with: | ||
| node-version-file: .nvmrc | ||
|
|
||
| - name: "Setup pnpm" | ||
| uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4 | ||
| - name: "Get pnpm store directory" | ||
| id: pnpm-cache | ||
| shell: bash | ||
| run: | | ||
| echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
| - name: "Setup cache" | ||
| uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4 | ||
| with: | ||
| path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | ||
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-pnpm-store- | ||
|
|
||
| - name: "Install dependencies" | ||
| run: pnpm install --frozen-lockfile | ||
| shell: bash |
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,10 @@ | ||
| name: "Setup Python Common" | ||
| description: "Setup Python and install dependencies" | ||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 | ||
| with: | ||
| python-version: '3.x' | ||
NikolaSimsic marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| - run: pip install PyYAML httplib2 | ||
| shell: bash | ||
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,42 @@ | ||
| name: "Setup Tools" | ||
| description: "Common setup for widget and js test jobs" | ||
| inputs: | ||
| mendix_version: | ||
| description: "Mendix version" | ||
| required: true | ||
| outputs: | ||
| java-path: | ||
| description: "Path to the installed Java" | ||
| value: ${{ steps.setup-java.outputs.path }} | ||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - name: "Setup Python and dependencies" | ||
| uses: ./.github/actions/setup-python | ||
|
|
||
| - name: "Setup Node and dependencies" | ||
| uses: ./.github/actions/setup-node-with-cache | ||
|
|
||
| - name: "Setup Java 21" | ||
| id: setup-java | ||
| uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 #v4 | ||
| with: | ||
| distribution: "temurin" | ||
| java-version: "21" | ||
|
|
||
| - name: "Cache Mendix runtime" | ||
| uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 #v4 | ||
| with: | ||
| path: tmp/runtime.tar.gz | ||
| key: mendix-runtime-${{ inputs.mendix_version }} | ||
|
|
||
| - name: "Cache m2ee-tools" | ||
| uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 #v4 | ||
| with: | ||
| path: tmp/m2ee | ||
| key: m2ee-tools-v1 | ||
|
|
||
| - name: "Install Maestro" | ||
| uses: ./.github/actions/setup-maestro | ||
|
|
||
|
|
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,14 @@ | ||
| name: "Setup Xcode CLI Tools" | ||
| description: "Ensure Xcode CLI tools are configured" | ||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - name: "Verify and set Xcode CLI tools" | ||
| shell: bash | ||
| run: | | ||
| if ! xcode-select --print-path; then | ||
| echo "Xcode CLI tools not set. Setting them now." | ||
| sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer | ||
| else | ||
| echo "Xcode CLI tools are already configured." | ||
| fi |
This file was deleted.
Oops, something went wrong.
46 changes: 46 additions & 0 deletions
46
.github/actions/use-arficats-from-specific-run/action.yaml
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,46 @@ | ||
| name: "Download Artifact from Specific Run" | ||
| description: "Download an artifact from a specific workflow run using GitHub CLI" | ||
| inputs: | ||
| artifact_name: | ||
| description: "Name of the artifact to download" | ||
| required: true | ||
| run_id: | ||
| description: "Workflow run ID" | ||
| required: true | ||
| output_dir: | ||
| description: "Directory to extract the artifact" | ||
| required: true | ||
| platform: | ||
| description: "Platform (android or ios)" | ||
| required: true | ||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - name: "Install GitHub CLI" | ||
| shell: bash | ||
| run: | | ||
| if ! command -v gh &> /dev/null; then | ||
| if [[ "$RUNNER_OS" == "Linux" ]]; then | ||
| sudo apt update | ||
| sudo apt install -y gh | ||
| elif [[ "$RUNNER_OS" == "macOS" ]]; then | ||
| brew install gh | ||
| fi | ||
| fi | ||
| - name: "Authenticate GitHub CLI" | ||
| shell: bash | ||
| run: | | ||
| unset GITHUB_TOKEN | ||
| echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token | ||
| - name: "Fetch artifact URL" | ||
| id: fetch-artifacts | ||
| shell: bash | ||
| run: | | ||
| url=$(gh api "repos/${{ github.repository }}/actions/runs/${{ inputs.run_id }}/artifacts" --jq '.artifacts[] | select(.name == "${{ inputs.artifact_name }}") | .archive_download_url') | ||
| echo "artifacts_url=$url" >> $GITHUB_ENV | ||
| - name: "Download and extract artifact" | ||
| if: env.artifacts_url != '' | ||
| shell: bash | ||
| run: | | ||
| curl -L -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -o ${{ inputs.platform }}-app.zip "$artifacts_url" | ||
| unzip ${{ inputs.platform }}-app.zip -d ${{ inputs.output_dir }} |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| #!/bin/bash | ||
| set -e | ||
|
|
||
| # Arguments | ||
| MDA_FILE="$1" | ||
| MENDIX_VERSION="$2" | ||
| JAVA_PATH="$3" | ||
| WORKSPACE="$4" | ||
|
|
||
| # Ensure setup script is executable | ||
| chmod +x .github/scripts/setup-runtime.sh | ||
|
|
||
| # Run setup | ||
| .github/scripts/setup-runtime.sh "$MDA_FILE" "$MENDIX_VERSION" "$JAVA_PATH" "$WORKSPACE" | ||
|
|
||
| # Stop any running Mendix runtime before starting a new one | ||
| if bin/m2ee -c "$WORKSPACE/project/m2ee-native.yml" status | grep -q "running"; then | ||
| echo "Stopping previous Mendix runtime..." | ||
| bin/m2ee -c "$WORKSPACE/project/m2ee-native.yml" stop | ||
| sleep 10 | ||
| fi | ||
|
|
||
| # Start runtime | ||
| START_OUTPUT=$(bin/m2ee -c "$WORKSPACE/project/m2ee-native.yml" --verbose --yolo start 2>&1) | ||
| echo "Full output from start command:" | ||
| echo "$START_OUTPUT" | ||
| if [ $? -eq 0 ]; then | ||
| echo "Runtime started successfully (exit code)." | ||
| exit 0 | ||
| fi | ||
|
|
||
| echo "Runtime did not start successfully." | ||
| exit 1 |
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.
Uh oh!
There was an error while loading. Please reload this page.