Skip to content

Commit

Permalink
Implement workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
BaptisteLecat committed Nov 28, 2023
1 parent d3db471 commit 845c73b
Show file tree
Hide file tree
Showing 8 changed files with 121 additions and 52 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/android_beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@ name: BETA - ANDROID | PlayStore
on:
push:
branches:
- main
paths-ignore:
- '**.md'
pull_request:
branches:
- main
- release/**

jobs:
build-and-deploy:
Expand All @@ -32,6 +27,9 @@ jobs:
- name: Get Flutter dependencies
run: flutter pub get

- name: Run tests
run: flutter test

- name: Setup Fastlane
uses: ruby/setup-ruby@v1
with:
Expand Down
17 changes: 14 additions & 3 deletions .github/workflows/develop-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,18 @@ jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v3

- name: Build and Test
run: |
echo "Build and Test"
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true

- name: Get Flutter dependencies
run: flutter pub get

- name: Run tests
run: flutter test

16 changes: 13 additions & 3 deletions .github/workflows/feature-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,17 @@ jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v3

- name: Build and Test
run: |
echo "Build and Test"
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true

- name: Get Flutter dependencies
run: flutter pub get

- name: Run tests
run: flutter test
10 changes: 8 additions & 2 deletions .github/workflows/ios_testflight.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: BETA - IOS | TestFlight

on:
push:
branches:
- main

- release/**
jobs:
ios:
environment: beta
Expand All @@ -21,6 +21,12 @@ jobs:
channel: stable
cache: true

- name: Get Flutter dependencies
run: flutter pub get

- name: Run tests
run: flutter test

- name: Setup Fastlane
uses: ruby/setup-ruby@v1
with:
Expand Down
21 changes: 0 additions & 21 deletions .github/workflows/release-workflow.yml

This file was deleted.

80 changes: 80 additions & 0 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.1.1"
coverage:
dependency: transitive
description:
name: coverage
sha256: ac86d3abab0f165e4b8f561280ff4e066bceaac83c424dd19f1ae2c2fcd12ca9
url: "https://pub.dev"
source: hosted
version: "1.7.1"
crypto:
dependency: transitive
description:
Expand Down Expand Up @@ -672,6 +680,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.4"
node_preamble:
dependency: transitive
description:
name: node_preamble
sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db"
url: "https://pub.dev"
source: hosted
version: "2.0.2"
package_config:
dependency: transitive
description:
Expand Down Expand Up @@ -920,6 +936,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.4.1"
shelf_packages_handler:
dependency: transitive
description:
name: shelf_packages_handler
sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e"
url: "https://pub.dev"
source: hosted
version: "3.0.2"
shelf_static:
dependency: transitive
description:
name: shelf_static
sha256: a41d3f53c4adf0f57480578c1d61d90342cd617de7fc8077b1304643c2d85c1e
url: "https://pub.dev"
source: hosted
version: "1.1.2"
shelf_web_socket:
dependency: transitive
description:
Expand Down Expand Up @@ -957,6 +989,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.3.3"
source_map_stack_trace:
dependency: transitive
description:
name: source_map_stack_trace
sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae"
url: "https://pub.dev"
source: hosted
version: "2.1.1"
source_maps:
dependency: transitive
description:
name: source_maps
sha256: "708b3f6b97248e5781f493b765c3337db11c5d2c81c3094f10904bfa8004c703"
url: "https://pub.dev"
source: hosted
version: "0.10.12"
source_span:
dependency: transitive
description:
Expand Down Expand Up @@ -1013,6 +1061,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.2.1"
test:
dependency: "direct dev"
description:
name: test
sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f
url: "https://pub.dev"
source: hosted
version: "1.24.9"
test_api:
dependency: transitive
description:
Expand All @@ -1021,6 +1077,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.6.1"
test_core:
dependency: transitive
description:
name: test_core
sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a
url: "https://pub.dev"
source: hosted
version: "0.5.9"
the_apple_sign_in:
dependency: "direct main"
description:
Expand Down Expand Up @@ -1165,6 +1229,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.4"
vm_service:
dependency: transitive
description:
name: vm_service
sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957
url: "https://pub.dev"
source: hosted
version: "13.0.0"
watcher:
dependency: transitive
description:
Expand Down Expand Up @@ -1197,6 +1269,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.4.0"
webkit_inspection_protocol:
dependency: transitive
description:
name: webkit_inspection_protocol
sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572"
url: "https://pub.dev"
source: hosted
version: "1.2.1"
win32:
dependency: transitive
description:
Expand Down
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ dev_dependencies:
json_serializable: ^6.7.0
freezed: ^2.3.5
retrofit_generator: ^7.0.7
test: ^1.24.9

flutter_launcher_icons:
android: "launcher_icon"
Expand Down
18 changes: 1 addition & 17 deletions test/widget_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,10 @@
// 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:weather_assistant/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);
expect(1, 1);
});
}

0 comments on commit 845c73b

Please sign in to comment.