From 37b8ee13b1e88b4e5e78569a4229193ed0ad044b Mon Sep 17 00:00:00 2001 From: Khoren Markosyan Date: Mon, 2 Dec 2024 12:30:27 +1100 Subject: [PATCH] refactor: enhance GitHub Actions workflow with improved job names for clarity --- .github/workflows/main.yml | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c402b33..9060c50 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,6 +18,7 @@ permissions: read-all jobs: # Job for linting and formatting Dart code lint: + name: "Lint and Format Dart Code" runs-on: ubuntu-latest steps: # Checkout the repository @@ -44,7 +45,7 @@ jobs: # Build the example application across all supported platforms build-example: - name: 'Build example (${matrix.target}, ${matrix.os})' + name: 'Build example (${{ matrix.target }}, ${{ matrix.os }})' needs: lint runs-on: ${{ matrix.os }}-latest timeout-minutes: 20 @@ -73,7 +74,7 @@ jobs: run: ./scripts/update_ios_macos_src.sh # Android-specific setup - - name: Setup Java for Android + - name: Setup Java for Android (${{ matrix.target }}, ${{ matrix.os }})' if: matrix.target == 'android' uses: actions/setup-java@v4 with: @@ -81,7 +82,7 @@ jobs: distribution: temurin # Linux-specific setup - - name: Install dependencies for Flutter on Linux + - name: Install dependencies for Flutter on Linux (${{ matrix.target }}, ${{ matrix.os }})' if: matrix.target == 'linux' && matrix.os == 'ubuntu' run: | sudo apt update @@ -102,7 +103,7 @@ jobs: enforce-lockfile: true # Build the example application - - name: Build example + - name: Build example for ${{ matrix.target }} on ${{ matrix.os }} run: | cd example TARGET=${{ matrix.target }} @@ -127,7 +128,7 @@ jobs: # Integration tests for all platforms except Android (handled separately) test-example: - name: 'Test example (${matrix.target}, ${matrix.os})' + name: 'Test example (${{ matrix.target }}, ${{ matrix.os }})' needs: build-example runs-on: ${{ matrix.os }}-latest timeout-minutes: 30 @@ -170,7 +171,7 @@ jobs: enforce-lockfile: true # Linux-specific dependencies - - name: Install dependencies for Flutter on Linux + - name: Install dependencies for Flutter on Linux (${{ matrix.target }}, ${{ matrix.os }})' if: matrix.target == 'linux' && matrix.os == 'ubuntu' run: | sudo apt update @@ -179,7 +180,7 @@ jobs: pkg-config xvfb network-manager upower # Launch iOS Simulator for iOS tests - - name: Launch iOS Simulator + - name: Launch iOS Simulator for ${{ matrix.target }} if: matrix.target == 'ios' run: | simulator_id=$(xcrun simctl create iphone-zxing \ @@ -188,7 +189,7 @@ jobs: xcrun simctl boot ${simulator_id} # Run tests - - name: Run tests + - name: Run tests for ${{ matrix.target }} on ${{ matrix.os }} run: | cd ./example if [ "${{ matrix.target }}" == "linux" ]; then @@ -199,7 +200,7 @@ jobs: # Integration tests on Android emulator test-example-android: - name: 'Test example (Android API v${{ matrix.api-level }})' + name: 'Test example on Android API level ${{ matrix.api-level }} (${{ matrix.os }})' needs: build-example runs-on: ubuntu-latest timeout-minutes: 30 @@ -212,7 +213,7 @@ jobs: with: submodules: recursive - - name: Setup Java for Android + - name: Setup Java for Android (${{ matrix.target }}, ${{ matrix.os }})' uses: actions/setup-java@v4 with: java-version: 11 @@ -231,14 +232,14 @@ jobs: enforce-lockfile: true # Enable KVM for Android emulators - - name: Enable KVM + - name: Enable KVM for Android emulators (${{ matrix.api-level }})' run: | echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules sudo udevadm control --reload-rules sudo udevadm trigger --name-match=kvm # Create and run Android emulator - - name: Run tests on Android emulator + - name: Run tests on Android API level ${{ matrix.api-level }} uses: reactivecircus/android-emulator-runner@v2 with: api-level: ${{ matrix.api-level }}