Skip to content

Commit

Permalink
chore: migrate very_good_flutter_package (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
alestiago authored Feb 19, 2024
1 parent 0ae41ae commit cd03b2d
Show file tree
Hide file tree
Showing 34 changed files with 709 additions and 1 deletion.
67 changes: 67 additions & 0 deletions .github/workflows/very_good_flutter_package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: very_good_flutter_package

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

on:
push:
paths:
- .github/workflows/very_good_flutter_package.yaml
- "very_good_flutter_package/**"
branches:
- main
pull_request:
paths:
- .github/workflows/very_good_flutter_package.yaml
- "very_good_flutter_package/**"
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_flutter_package -c very_good_flutter_package/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_package
- name: ✨ Check Formatting
run: dart format --set-exit-if-changed output/test_package

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

- name: 🧪 Run Tests
run: |
cd output/test_package
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_package/coverage/lcov.info
4 changes: 3 additions & 1 deletion mason.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ bricks:
very_good_dart_cli:
path: very_good_dart_cli
very_good_dart_package:
path: very_good_dart_package
path: very_good_dart_package
very_good_flutter_package:
path: very_good_flutter_package
17 changes: 17 additions & 0 deletions very_good_flutter_package/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.DS_Store
.atom/
.idea/*
.vscode/*

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

# Files and directories created by mason
.mason/
mason-lock.json
output/

# Files and directories created by MacOS
.DS_Store
66 changes: 66 additions & 0 deletions very_good_flutter_package/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# 0.4.1

- feat: upgrade to very_good_analysis ^5.1.0
- docs: update README.md install instructions

# 0.4.0

- feat!: bump min Dart SDK to 3.0.0

# 0.3.0

- feat!: bump min Dart SDK to 2.19.0

# 0.2.6

- chore: support dart sdk 2.18.0

# 0.2.5

- feat: update workflows, add spellcheck
- fix: flutter version on github workflow

# 0.2.4

- fix: upgrade workflow to use Flutter 3.7.3 for compatibility with Very Good Analysis

# 0.2.3

- feat: upgrade to `very_good_analysis ^4.0.0`

# 0.2.2

- feat: upgrade to Flutter 3.7.0

# 0.2.1

- fix: windows path resolution
- fix: GitHub workflow concurrency group

# 0.2.0

- **BREAKING** feat: add `publishable` flag (defaults to `false`)

# 0.1.4

- docs: remove copyright header and license from generated code

# 0.1.3

- feat: upgrade to Flutter 3.3.7

# 0.1.2

- feat: upgrade to Flutter 3.3.3

# 0.1.1

- feat: upgrade to Flutter 3.3.2 and very_good_analysis 3.1.0

# 0.1.0

- feat: upgrade to Flutter 3.3.1 and very_good_analysis 3.0.2

# 0.0.1

- feat: initial release 🎉
21 changes: 21 additions & 0 deletions very_good_flutter_package/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 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.
67 changes: 67 additions & 0 deletions very_good_flutter_package/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Very Good Flutter Package

[![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 package created by Very Good Ventures 🦄.

## What's Included ✨

- ✅ GitHub Workflow powered by [Very Good Workflows][very_good_workflows_link]
- ✅ Pull Request Template
- ✅ Issue Templates
- ✅ Dependabot Integration
- ✅ Strict lint rules powered by [Very Good Analysis][very_good_analysis_link]
- ✅ 100% Test Coverage
- ✅ Fully Documented Public API
- ✅ MIT License
- ✅ Changelog

## Output 📦

```sh
├── .github
│ ├── ISSUE_TEMPLATE
│ │ ├── bug_report.md
│ │ ├── build.md
│ │ ├── chore.md
│ │ ├── ci.md
│ │ ├── config.yml
│ │ ├── documentation.md
│ │ ├── feature_request.md
│ │ ├── performance.md
│ │ ├── refactor.md
│ │ ├── revert.md
│ │ ├── style.md
│ │ └── test.md
│ ├── PULL_REQUEST_TEMPLATE.md
│ ├── dependabot.yaml
│ └── workflows
│ └── main.yaml
├── .gitignore
├── CHANGELOG.md
├── LICENSE
├── README.md
├── analysis_options.yaml
├── coverage_badge.svg
├── lib
│ ├── src
│ │ └── my_package.dart
│ └── my_package.dart
├── pubspec.yaml
└── test
└── src
└── my_package_test.dart
```

[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
[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,29 @@
---
name: Bug Report
about: Create a report to help us improve
title: "fix: "
labels: bug
---

**Description**

A clear and concise description of what the bug is.

**Steps To Reproduce**

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected Behavior**

A clear and concise description of what you expected to happen.

**Screenshots**

If applicable, add screenshots to help explain your problem.

**Additional Context**

Add any other context about the problem here.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Build System
about: Changes that affect the build system or external dependencies
title: "build: "
labels: build
---

**Description**

Describe what changes need to be done to the build system and why.

**Requirements**

- [ ] The build system is passing
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Chore
about: Other changes that don't modify src or test files
title: "chore: "
labels: chore
---

**Description**

Clearly describe what change is needed and why. If this changes code then please use another issue type.

**Requirements**

- [ ] No functional changes to the code
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Continuous Integration
about: Changes to the CI configuration files and scripts
title: "ci: "
labels: ci
---

**Description**

Describe what changes need to be done to the ci/cd system and why.

**Requirements**

- [ ] The ci system is passing
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Documentation
about: Improve the documentation so all collaborators have a common understanding
title: "docs: "
labels: documentation
---

**Description**

Clearly describe what documentation you are looking to add or improve.

**Requirements**

- [ ] Requirements go here
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: Feature Request
about: A new feature to be added to the project
title: "feat: "
labels: feature
---

**Description**

Clearly describe what you are looking to add. The more context the better.

**Requirements**

- [ ] Checklist of requirements to be fulfilled

**Additional Context**

Add any other context or screenshots about the feature request go here.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Performance Update
about: A code change that improves performance
title: "perf: "
labels: performance
---

**Description**

Clearly describe what code needs to be changed and what the performance impact is going to be. Bonus point's if you can tie this directly to user experience.

**Requirements**

- [ ] There is no drop in test coverage.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Refactor
about: A code change that neither fixes a bug nor adds a feature
title: "refactor: "
labels: refactor
---

**Description**

Clearly describe what needs to be refactored and why. Please provide links to related issues (bugs or upcoming features) in order to help prioritize.

**Requirements**

- [ ] There is no drop in test coverage.
Loading

0 comments on commit cd03b2d

Please sign in to comment.