Skip to content

Commit

Permalink
Merge pull request #66 from ChicoState/flutter-CI
Browse files Browse the repository at this point in the history
Github Actions for Flutter Frontend
  • Loading branch information
TaigaODonnell authored Dec 2, 2024
2 parents 9200672 + 69886eb commit 35e6c53
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 13 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/frontendFlutter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Dart

on:
push:
branches:
- '*'
- '!main'
pull_request:
branches:
- main

jobs:
Build:
#Build-and-Test:
runs-on: ubuntu-latest

steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Pub Get
working-directory: fightme_webapp
run: flutter pub get
# Testing part but since we have no test, i comment out
#- run: flutter test
# working-directory: fightme_webapp
- run: flutter build web
working-directory: fightme_webapp
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![Java CI with Maven](https://github.com/ChicoState/FightMe/actions/workflows/verifyBackendPR.yml/badge.svg)](https://github.com/ChicoState/FightMe/actions/workflows/verifyBackendPR.yml)
[![Dart](https://github.com/ChicoState/FightMe/actions/workflows/frontendFlutter.yml/badge.svg)](https://github.com/ChicoState/FightMe/actions/workflows/frontendFlutter.yml)
# FightMe

A messaging Application with a built in game component.
Expand Down
26 changes: 13 additions & 13 deletions fightme_webapp/test/widget_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ import 'package:flutter_test/flutter_test.dart';
import 'package:fightme_webapp/main.dart';

void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(const MyApp());
// 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);
// // 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();
// // 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);
});
// // Verify that our counter has incremented.
// expect(find.text('0'), findsNothing);
// expect(find.text('1'), findsOneWidget);
// });
}

0 comments on commit 35e6c53

Please sign in to comment.