Skip to content

Commit

Permalink
Added GitHub Actions for MyHack
Browse files Browse the repository at this point in the history
  • Loading branch information
KCui0327 committed Nov 26, 2023
1 parent 30f13d2 commit 3691ea1
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 10 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
on:
pull_request:
branches:
- main
push:
branches:
- main
name: "MyHack Build & Release"
jobs:
build:
name: MyHack Build & Release
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
java-version: '12.x'
- uses: subosito/flutter-action@v1
with:
flutter-version: '3.13.9'
- name: Run Flutter Commands
run: |
cd app
flutter config --no-analytics
flutter pub get
flutter test
flutter build apk --debug --split-per-abi
- name: Push to Releases
uses: ncipollo/release-action@v1
with:
artifacts: "build/app/outputs/apk/debug/*"
tag: v1.0.${{ github.run_number }}
token: ${{ secrets.TOKEN }}
21 changes: 11 additions & 10 deletions app/test/widget_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,19 @@ import 'package:app/main.dart';
void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(const MyApp());
// 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 3691ea1

Please sign in to comment.