fix: style IMP Widget UI similar to sec reader #102
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
| name: Dev - ↩️ pull request | |
| on: | |
| pull_request: | |
| branches: | |
| - dev | |
| jobs: | |
| validate_pr: | |
| permissions: | |
| pull-requests: write | |
| uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/semantic_pull_request.yml@v1 | |
| test_version: | |
| needs: validate_pr | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{secrets.ELEVATED_TOKEN}} | |
| - name: 📇 Configure git | |
| run: | | |
| git fetch --prune --unshallow | |
| git config --global user.name "GitHub Actions" | |
| git config --global user.email "gh-actions@emdgroup.com" | |
| shell: bash | |
| # Retrieve the new version | |
| - name: 🔂 Run standard-version | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const {execSync} = require('child_process'); | |
| execSync('npx standard-version --dry-run --prerelease', {stdio: 'inherit'}); | |
| build_example: | |
| name: Build Example | |
| needs: test_version | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Dart | |
| uses: dart-lang/setup-dart@v1 | |
| - name: Prepare Flutter | |
| uses: emdgroup/mtrust-urp/.github/shared_actions/prepare-flutter@dev | |
| with: | |
| directory: example/example | |
| - name: Run static analysis | |
| run: | | |
| cd example/example | |
| flutter analyze --no-fatal-warnings | |
| shell: bash | |
| - name: Check licenses | |
| uses: emdgroup/mtrust-urp/.github/shared_actions/check-dart-licenses@dev | |
| with: | |
| directory: example/example | |
| build_advanced_example: | |
| name: Build Advanced Example | |
| needs: test_version | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Dart | |
| uses: dart-lang/setup-dart@v1 | |
| - name: Prepare Flutter | |
| uses: emdgroup/mtrust-urp/.github/shared_actions/prepare-flutter@dev | |
| with: | |
| directory: example/example_advanced | |
| - name: Run static analysis | |
| run: | | |
| cd example/example_advanced | |
| flutter analyze --no-fatal-warnings | |
| shell: bash | |
| - name: Check licenses | |
| uses: emdgroup/mtrust-urp/.github/shared_actions/check-dart-licenses@dev | |
| with: | |
| directory: example/example_advanced | |
| build_library: | |
| name: Build Library | |
| needs: test_version | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Dart | |
| uses: dart-lang/setup-dart@v1 | |
| - name: Prepare Flutter | |
| uses: emdgroup/mtrust-urp/.github/shared_actions/prepare-flutter@dev | |
| with: | |
| directory: . | |
| - name: Validate Flutter | |
| uses: emdgroup/mtrust-urp/.github/shared_actions/validate-flutter@dev | |
| with: | |
| directory: . | |
| is_package: true | |
| - name: Check licenses | |
| uses: emdgroup/mtrust-urp/.github/shared_actions/check-dart-licenses@dev | |
| with: | |
| directory: . | |
| matrix-generation: | |
| name: Generate Compatibility Matrix | |
| needs: validate_pr | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.generate-matrix.outputs.matrix }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Fetch firmware versions | |
| uses: ./.github/actions/fetch-firmware-versions | |
| id: fetch-firmware-versions | |
| with: | |
| token: ${{secrets.ELEVATED_TOKEN}} | |
| - name: Fetch SDK versions | |
| uses: ./.github/actions/fetch-sdk-versions | |
| id: fetch-sdk-versions | |
| - name: Generate compatibility matrix | |
| id: generate-matrix | |
| run: | | |
| # Parse the JSON arrays and create a matrix | |
| firmware_versions=$(echo '${{ steps.fetch-firmware-versions.outputs.versions }}' | jq -r '.[]') | |
| sdk_versions=$(echo '${{ steps.fetch-sdk-versions.outputs.versions }}' | jq -r '.[]') | |
| echo "Latest 3 major.minor firmware versions:" | |
| echo "$firmware_versions" | |
| echo "" | |
| echo "Current SDK version:" | |
| echo "$sdk_versions" | |
| echo "" | |
| # Create matrix combinations using current SDK version with latest 3 firmware versions | |
| matrix_combinations="[]" | |
| count=0 | |
| while IFS= read -r firmware; do | |
| # For each firmware version, use the current SDK version | |
| combination=$(jq -n --arg fw "$firmware" --arg sdk "$sdk_versions" '{firmware: $fw, sdk: $sdk}') | |
| # Add to matrix array | |
| matrix_combinations=$(echo "$matrix_combinations" | jq --argjson combo "$combination" '. += [$combo]') | |
| count=$((count + 1)) | |
| done <<< "$firmware_versions" | |
| # Validate JSON before output | |
| if echo "$matrix_combinations" | jq empty 2>/dev/null; then | |
| # Use jq to compact the JSON for GitHub Actions output | |
| compact_matrix=$(echo "$matrix_combinations" | jq -c .) | |
| echo "matrix=$compact_matrix" >> $GITHUB_OUTPUT | |
| echo "Generated matrix with $count combinations (latest 3 firmware × current SDK version)" | |
| echo "Matrix preview:" | |
| echo "$matrix_combinations" | jq '.[0:3]' # Show first 3 combinations | |
| else | |
| echo "Error: Invalid JSON generated" | |
| echo "Generated content:" | |
| echo "$matrix_combinations" | |
| exit 1 | |
| fi | |
| compatibility-tests: | |
| name: Compatibility Tests | |
| needs: matrix-generation | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: ${{ fromJson(needs.matrix-generation.outputs.matrix) }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Test compatibility | |
| uses: ./.github/actions/test-compatibility | |
| with: | |
| token: ${{secrets.ELEVATED_TOKEN}} | |
| firmware_version: ${{ matrix.firmware }} | |
| sdk_version: ${{ matrix.sdk }} |