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

chore: migrate very_good_wear_app #2

Merged
merged 4 commits into from
Feb 19, 2024
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
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
name: ci
name: semantic_pull_request

on:
pull_request:
branches:
- main
push:
branches:
- main

jobs:
build:
Expand Down
105 changes: 105 additions & 0 deletions .github/workflows/very_good_wear_app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: very_good_wear_app

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
push:
paths:
- .github/workflows/very_good_wear_app.yaml
- "very_good_wear_app/**"
branches:
- main
pull_request:
paths:
- .github/workflows/very_good_wear_app.yaml
- "very_good_wear_app/**"
branches:
- main

jobs:
brick:
runs-on: ubuntu-latest

strategy:
matrix:
flutter-version:
# The version of Flutter to use should use the minimum Dart SDK version supported by the package,
# refer to https://docs.flutter.dev/development/tools/sdk/releases.
- "3.13.0"
- "any"

steps:
- name: 📚 Git Checkout
uses: actions/checkout@v4

- name: 🐦 Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.flutter-version }}

- name: 🧱 Mason Make
run: |
dart pub global activate mason_cli
mason get
mason make very_good_wear_app -c very_good_wear_app/config.json -o output --on-conflict overwrite

- name: 📦 Install Dependencies
run: |
dart pub global activate very_good_cli
very_good packages get --recursive output/test_app

- name: ✨ Check Formatting
run: dart format --set-exit-if-changed output/test_app

- name: 🕵️ Analyze
run: dart analyze --fatal-infos --fatal-warnings output/test_app

- name: 🧪 Run Tests
run: |
cd output/test_app
very_good test -j 4 --recursive --optimization --coverage --test-randomize-ordering-seed random

- name: 📊 Check Code Coverage
uses: VeryGoodOpenSource/very_good_coverage@v2
with:
path: output/test_app/coverage/lcov.info

e2e:
runs-on: ubuntu-latest

defaults:
run:
working-directory: very_good_wear_app/e2e

strategy:
matrix:
flutter-version:
# The version of Flutter to use should use the minimum Dart SDK version supported by the package,
# refer to https://docs.flutter.dev/development/tools/sdk/releases.
- "3.13.0"
- "any"

steps:
- name: 📚 Git Checkout
uses: actions/checkout@v4

- name: 🐦 Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.flutter-version }}

- name: 📦 Install Dependencies
run: |
flutter pub global activate very_good_cli
very_good packages get --recursive

- name: ✨ Check Formatting
run: dart format --line-length 80 --set-exit-if-changed lib test

- name: 🕵️ Analyze
run: flutter analyze lib test

- name: 🧪 Run Tests
run: very_good test -j 4 --optimization --test-randomize-ordering-seed random
21 changes: 21 additions & 0 deletions .github/workflows/very_good_wear_app_hooks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: very_good_wear_app_hooks

on:
pull_request:
paths:
- ".github/workflows/very_good_wear_app_hooks.yaml"
- "very_good_wear_app/hooks/**"
push:
branches:
- main
paths:
- ".github/workflows/very_good_wear_app_hooks.yaml"
- "very_good_wear_app/hooks/**"

jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_package.yml@v1
with:
working_directory: "very_good_wear_app/hooks"
analyze_directories: "test"
report_on: "pre_gen.dart"
2 changes: 2 additions & 0 deletions mason.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
bricks:
very_good_core:
path: very_good_core
very_good_wear_app:
path: very_good_wear_app
12 changes: 12 additions & 0 deletions very_good_wear_app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.DS_Store
.atom/
.idea/*
.vscode/*

# Files and directories created by pub
.dart_tool/
.packages
pubspec.lock

# Conventional directory for build outputs
build/
21 changes: 21 additions & 0 deletions very_good_wear_app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# 0.3.0

- feat!: update to Flutter 3.13.2
- feat: update to Material 3
- fix: project doesn't build due to kotlin gradle plugin incompatibility
- fix: very_good create flutter_app doesn't create .gradlew files
- feat: upgrade to `very_good_analysis ^5.1.0`

# 0.2.0

- feat!: bump min Dart SDK to 3.0.0

# 0.1.0

- docs: fixed VeryGoodCore typo
- feat!: bump min Dart SDK to 2.19.0

# 0.0.1

- feat: add brick generator
- add template application base
21 changes: 21 additions & 0 deletions very_good_wear_app/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Very Good Ventures

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
42 changes: 42 additions & 0 deletions very_good_wear_app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# very_good_wear_app

[![Very Good Ventures][logo_white]][very_good_ventures_link_dark]

Developed with 💙 by [Very Good Ventures][very_good_ventures_link] 🦄

[![License: MIT][license_badge]][license_link]
[![Powered by Mason](https://img.shields.io/endpoint?url=https%3A%2F%2Ftinyurl.com%2Fmason-badge)](https://github.com/felangel/mason)

A Very Good Flutter starter project for Wear OS devices created by Very Good Ventures 🦄.

## What's Included ✨

Out of the box, Very Good Wear App includes:

- ✅ Made for [Wear OS][wearos_link]
- ✅ Rotary input support
- ✅ Adaptive UI - Changes colors when the device is in ambient mode
- ✅ [Build Flavors][flutter_flavors_link] - Multiple flavor support for development, staging, and production
- ✅ [Internationalization Support][internationalization_link] - Internationalization support using synthetic code generation to streamline the development process
- ✅ [Sound Null-Safety][null_safety_link] - No more null-dereference exceptions at runtime. Develop with a sound, static type system.
- ✅ [Bloc][bloc_link] - Integrated bloc architecture for scalable, testable code which offers a clear separation between business logic and presentation
- ✅ [Testing][testing_link] - Unit and Widget Tests with 100% line coverage
- ✅ [Logging][logging_link] - Built-in, extensible logging to capture uncaught Flutter and Dart Exceptions
- ✅ Dependabot Integration


[wearos_link]: https://wearos.google.com/
[bloc_link]: https://bloclibrary.dev
[flutter_flavors_link]: https://flutter.dev/docs/deployment/flavors
[github_actions_link]: https://github.com/features/actions
[internationalization_link]: https://flutter.dev/docs/development/accessibility-and-localization/internationalization
[license_badge]: https://img.shields.io/badge/license-MIT-blue.svg
[license_link]: https://opensource.org/licenses/MIT
[logo_white]: https://raw.githubusercontent.com/VGVentures/very_good_brand/main/styles/README/vgv_logo_white.png#gh-dark-mode-only
[logging_link]: https://api.flutter.dev/flutter/dart-developer/log.html
[null_safety_link]: https://flutter.dev/docs/null-safety
[testing_link]: https://flutter.dev/docs/testing
[very_good_analysis_link]: https://pub.dev/packages/very_good_analysis
[very_good_ventures_link_dark]: https://verygood.ventures#gh-dark-mode-only
[very_good_ventures_link]: https://verygood.ventures
[very_good_workflows_link]: https://github.com/VeryGoodOpenSource/very_good_workflows
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!--
Thanks for contributing!

Provide a description of your changes below and a general summary in the title

Please look at the following checklist to ensure that your PR can be accepted quickly:
-->

## Description

<!--- Describe your changes in detail -->

## Type of Change

<!--- Put an `x` in all the boxes that apply: -->

- [ ] ✨ New feature (non-breaking change which adds functionality)
- [ ] 🛠️ Bug fix (non-breaking change which fixes an issue)
- [ ] ❌ Breaking change (fix or feature that would cause existing functionality to change)
- [ ] 🧹 Code refactor
- [ ] ✅ Build configuration change
- [ ] 📝 Documentation
- [ ] 🗑️ Chore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"version": "0.2",
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
"dictionaries": ["vgv_allowed", "vgv_forbidden"],
"dictionaryDefinitions": [
{
"name": "vgv_allowed",
"path": "https://raw.githubusercontent.com/verygoodopensource/very_good_dictionaries/main/allowed.txt",
"description": "Allowed VGV Spellings"
},
{
"name": "vgv_forbidden",
"path": "https://raw.githubusercontent.com/verygoodopensource/very_good_dictionaries/main/forbidden.txt",
"description": "Forbidden VGV Spellings"
}
],
"useGitignore": true,
"words": [
"Contador",
"localizable",
"mostrado",
"página",
"Texto",
"Wearos"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "pub"
directory: "/"
schedule:
interval: "daily"
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: {{project_name.snakeCase()}}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
semantic-pull-request:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/semantic_pull_request.yml@v1

build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
flutter_channel: stable

spell-check:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/spell_check.yml@v1
with:
includes: |
**/*.md
modified_files_only: false
Loading
Loading