From 5ec560e5cfc64242c54d4bd8bfe67bdee91dfc74 Mon Sep 17 00:00:00 2001 From: Sayid Date: Fri, 28 Feb 2025 13:21:15 +0500 Subject: [PATCH] Update workflows --- .github/workflows/analysis.yaml | 39 +++++++++++++++++++++++++++++++++ .github/workflows/main.yaml | 27 ----------------------- test/widget_test.dart | 30 ------------------------- 3 files changed, 39 insertions(+), 57 deletions(-) create mode 100644 .github/workflows/analysis.yaml delete mode 100644 test/widget_test.dart diff --git a/.github/workflows/analysis.yaml b/.github/workflows/analysis.yaml new file mode 100644 index 0000000..1b8a9b8 --- /dev/null +++ b/.github/workflows/analysis.yaml @@ -0,0 +1,39 @@ +name: "Analysis" + +on: + pull_request: + branches: + - master + - dev + push: + branches: + - master + - dev + +jobs: + analysis: + name: Analysis + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Setup Flutter + uses: subosito/flutter-action@v2 + with: + flutter-version: "3.27.1" + channel: "stable" + + - name: Cache Flutter Dependencies + uses: actions/cache@v3 + with: + path: ~/.pub-cache + key: flutter-${{ runner.os }}-${{ hashFiles('**/pubspec.yaml') }} + restore-keys: | + flutter-${{ runner.os }}- + + - name: Install Dependencies + run: flutter pub get + + - name: Analyze Flutter Code + run: flutter analyze diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index e95083a..bdda7d6 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -9,33 +9,6 @@ on: - master jobs: - analysis: - name: Analysis - runs-on: ubuntu-latest - steps: - - name: Checkout Repository - uses: actions/checkout@v3 - - - name: Setup Flutter - uses: subosito/flutter-action@v2 - with: - flutter-version: "3.27.1" - channel: "stable" - - - name: Cache Flutter Dependencies - uses: actions/cache@v3 - with: - path: ~/.pub-cache - key: flutter-${{ runner.os }}-${{ hashFiles('**/pubspec.yaml') }} - restore-keys: | - flutter-${{ runner.os }}- - - - name: Install Dependencies - run: flutter pub get - - - name: Analyze Flutter Code - run: flutter analyze - build: name: Build & Release runs-on: macos-latest diff --git a/test/widget_test.dart b/test/widget_test.dart deleted file mode 100644 index 87ed2c6..0000000 --- a/test/widget_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// This is a basic Flutter widget test. -// -// To perform an interaction with a widget in your test, use the WidgetTester -// utility in the flutter_test package. For example, you can send tap and scroll -// gestures. You can also use WidgetTester to find child widgets in the widget -// tree, read text, and verify that the values of widget properties are correct. - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; - -import 'package:lask_flutter/main.dart'; - -void main() { - testWidgets('Counter increments smoke test', (WidgetTester tester) async { - // Build our app and trigger a frame. - await tester.pumpWidget(const MyApp()); - - // Verify that our counter starts at 0. - expect(find.text('0'), findsOneWidget); - expect(find.text('1'), findsNothing); - - // Tap the '+' icon and trigger a frame. - await tester.tap(find.byIcon(Icons.add)); - await tester.pump(); - - // Verify that our counter has incremented. - expect(find.text('0'), findsNothing); - expect(find.text('1'), findsOneWidget); - }); -}