Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test frontend github action #21

Merged
merged 4 commits into from
Jun 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/test_frontend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Test Frontend
on: [push]
# Cancel inprogress runs if new commit pushed
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- run: flutter pub get
- run: flutter pub run build_runner build
- run: flutter analyze
- run: flutter test
- run: flutter build web
1 change: 1 addition & 0 deletions frontend/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ include: package:flutter_lints/flutter.yaml
analyzer:
plugins:
- custom_lint
exclude: ["lib/models/*.g.dart", "lib/models/*.freezed.dart"]

linter:
rules:
Expand Down
4 changes: 2 additions & 2 deletions frontend/lib/ui/dashboard/dashboard_header.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ class DashboardHeader extends StatelessWidget {
style: Theme.of(context).textTheme.headlineLarge,
),
const SizedBox(height: Spacing.level4),
Row(
children: const [
const Row(
children: [
_LegendEntry(
icon: Icon(YaruIcons.ok, color: YaruColors.success),
text: 'Passed',
Expand Down
4 changes: 2 additions & 2 deletions frontend/lib/ui/navbar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ class Navbar extends StatelessWidget {
children: [
Image.asset('assets/canonical.png'),
const SizedBox(width: Spacing.level4),
Expanded(
const Expanded(
child: Row(
children: const [
children: [
_NavbarEntry(title: 'Snap Testing', route: AppRoutes.snaps),
_NavbarEntry(title: 'Deb Testing', route: AppRoutes.debs),
],
Expand Down
33 changes: 27 additions & 6 deletions frontend/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.4.0"
clock:
dependency: transitive
description:
name: clock
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
url: "https://pub.dev"
source: hosted
version: "1.1.1"
code_builder:
dependency: transitive
description:
Expand Down Expand Up @@ -225,6 +233,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "5.2.0+1"
fake_async:
dependency: transitive
description:
name: fake_async
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
url: "https://pub.dev"
source: hosted
version: "1.3.1"
ffi:
dependency: transitive
description:
Expand Down Expand Up @@ -270,6 +286,11 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.3.6"
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
flutter_web_plugins:
dependency: transitive
description: flutter
Expand Down Expand Up @@ -407,10 +428,10 @@ packages:
dependency: transitive
description:
name: matcher
sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
url: "https://pub.dev"
source: hosted
version: "0.12.16"
version: "0.12.15"
nadzyah marked this conversation as resolved.
Show resolved Hide resolved
material_color_utilities:
dependency: transitive
description:
Expand Down Expand Up @@ -588,10 +609,10 @@ packages:
dependency: transitive
description:
name: source_span
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
url: "https://pub.dev"
source: hosted
version: "1.10.0"
version: "1.9.1"
stack_trace:
dependency: transitive
description:
Expand Down Expand Up @@ -644,10 +665,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8"
sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
url: "https://pub.dev"
source: hosted
version: "0.6.0"
version: "0.5.1"
timing:
dependency: transitive
description:
Expand Down
2 changes: 2 additions & 0 deletions frontend/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ dependencies:
yaru_icons: ^1.0.4
yaru_widgets: ^2.4.1
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^2.0.0
dependency_validator: ^3.2.2
build_runner: ^2.3.3
Expand Down
7 changes: 7 additions & 0 deletions frontend/test/dummy_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import 'package:flutter_test/flutter_test.dart';

void main() {
test('dummy test to not fail CI', () {
expect(1, 1);
});
}