Skip to content

Commit

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

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

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

jobs:
brick:
runs-on: ubuntu-latest

strategy:
matrix:
dart-version:
# The minimum Dart SDK version supported by the package,
# refer to https://docs.flutter.dev/development/tools/sdk/releases.
- "3.1.0"
- "stable"

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

- name: 🎯 Setup Dart
uses: dart-lang/setup-dart@v1
with:
sdk: ${{ matrix.dart-version }}

- name: 🧱 Mason Make
run: |
dart pub global activate mason_cli
mason get
mason make very_good_dart_package -c very_good_dart_package/config.json -o output --on-conflict overwrite
- name: 📦 Install Dependencies
run: dart pub get --directory 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: |
dart pub global activate coverage 1.2.0
cd output/test_package
dart test -j 4 --coverage=coverage
dart pub global run coverage:format_coverage --lcov --check-ignore --in=coverage --out=coverage/lcov.info --packages=.dart_tool/package_config.json --report-on="lib"
cd ../../
- 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 @@ -4,4 +4,6 @@ bricks:
very_good_wear_app:
path: very_good_wear_app
very_good_dart_cli:
path: very_good_dart_cli
path: very_good_dart_cli
very_good_dart_package:
path: very_good_dart_package
16 changes: 16 additions & 0 deletions very_good_dart_package/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.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
55 changes: 55 additions & 0 deletions very_good_dart_package/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# 0.4.1

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

# 0.4.0

- feat!: update to Dart 3

# 0.3.0

- feat!: bump min Dart SDK to 2.19.0

# 0.2.5

- fix: patch version downgrade
- chore: support dart sdk 2.18.0

# 0.2.4

- fix: unnecessary issue/pr templates on template src
- feat: update workflows, add spellcheck

# 0.2.3

- feat: upgrade to `very_good_analysis ^4.0.0`

# 0.2.2

- feat: upgrade to Dart 2.19 and fix dependabot file

# 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.2

- docs: remove copyright header and license from generated code

# 0.1.1

- feat: upgrade to very_good_analysis 3.1.0

# 0.1.0

- feat: upgrade to Dart 2.18 and very_good_analysis 3.0.2

# 0.0.1

- feat: initial release 🎉
21 changes: 21 additions & 0 deletions very_good_dart_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_dart_package/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Very Good Dart 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 Dart 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 0ae41ae

Please sign in to comment.