From 536d06753d919a357ce9cbad6edf1f8df6aadfcb Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Tue, 13 Sep 2022 21:37:12 +0200 Subject: [PATCH] Parallel CI jobs (#201) - flutter analyze - flutter build linux - flutter format - flutter pub publish --dry-run - flutter test --- .github/workflows/flutter-ci.yml | 71 ++++++++++++++++++++++++++------ 1 file changed, 58 insertions(+), 13 deletions(-) diff --git a/.github/workflows/flutter-ci.yml b/.github/workflows/flutter-ci.yml index ccbc80fd3..8cc991e46 100644 --- a/.github/workflows/flutter-ci.yml +++ b/.github/workflows/flutter-ci.yml @@ -9,33 +9,78 @@ on: - main jobs: - build: + analyze: runs-on: ubuntu-20.04 steps: - - - uses: actions/checkout@v1 - - uses: subosito/flutter-action@v1 + + - uses: actions/checkout@v2 + - uses: subosito/flutter-action@v2 with: channel: 'stable' - - name: Enable Linux desktop support - run: flutter config --enable-linux-desktop - - name: Get dependencies run: flutter pub get - - - name: Run tests - run: flutter test - - name: Check for any formatting issues - run: flutter format --set-exit-if-changed . - - name: Check for any analyzer issues run: flutter analyze . + build: + runs-on: ubuntu-20.04 + steps: + + - uses: actions/checkout@v2 + - uses: subosito/flutter-action@v2 + with: + channel: 'stable' + + - name: Get dependencies + run: flutter pub get + - name: Install dependencies run: sudo apt install clang cmake curl ninja-build libgtk-3-dev pkg-config unzip - name: Build example run: flutter build linux -v working-directory: example/ + + format: + runs-on: ubuntu-20.04 + steps: + + - uses: actions/checkout@v2 + - uses: subosito/flutter-action@v2 + with: + channel: 'stable' + + - name: Check for any formatting issues + run: flutter format --set-exit-if-changed . + + pub: + runs-on: ubuntu-20.04 + steps: + + - uses: actions/checkout@v2 + - uses: subosito/flutter-action@v2 + with: + channel: 'stable' + + - name: Get dependencies + run: flutter pub get + + - name: Validate but do not publish the package + run: flutter pub publish --dry-run + + test: + runs-on: ubuntu-20.04 + steps: + + - uses: actions/checkout@v2 + - uses: subosito/flutter-action@v2 + with: + channel: 'stable' + + - name: Get dependencies + run: flutter pub get + + - name: Run tests + run: flutter test