Skip to content

Commit f24a949

Browse files
committed
changes for jaspr
1 parent 36a8229 commit f24a949

45 files changed

Lines changed: 3003 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

site_jaspr/.gitignore

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Files and directories created by pub.
2+
**/doc/api/
3+
.dart_tool/
4+
.packages
5+
6+
# Conventional directory for build output.
7+
/build/
8+
9+
# Miscellaneous
10+
*.class
11+
*.log
12+
*.pyc
13+
*.swp
14+
.DS_Store
15+
.atom/
16+
.buildlog/
17+
.history
18+
.svn/
19+
migrate_working_dir/
20+
21+
# IntelliJ related
22+
*.iml
23+
*.ipr
24+
*.iws
25+
.idea/
26+
27+
# The .vscode folder contains launch configuration and tasks you configure in
28+
# VS Code which you may wish to be included in version control, so this line
29+
# is commented out by default.
30+
#.vscode/

site_jaspr/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# site_jaspr
2+
3+
A documentation site built with Jaspr
4+
5+
## Running the project
6+
7+
Run your project using `jaspr serve`.
8+
9+
The development server will be available on `http://localhost:8080`.
10+
11+
## Building the project
12+
13+
Build your project using `jaspr build`.
14+
15+
The output will be located inside the `build/jaspr/` directory.

site_jaspr/analysis_options.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# This file configures the static analysis results for your project (errors,
2+
# warnings, and lints).
3+
#
4+
# This enables the 'recommended' set of lints from `package:lints`.
5+
# This set helps identify many issues that may lead to problems when running
6+
# or consuming Dart code, and enforces writing Dart using a single, idiomatic
7+
# style and format.
8+
#
9+
# If you want a smaller set of lints you can change this to specify
10+
# 'package:lints/core.yaml'. These are just the most critical lints
11+
# (the recommended set includes the core lints).
12+
# The core lints are also what is used by pub.dev for scoring packages.
13+
14+
include: package:lints/recommended.yaml
15+
16+
analyzer:
17+
# exclude:
18+
# - path/to/excluded/files/**
19+
20+
# Jaspr has a custom analyzer plugin 'jaspr_lints', which is enabled here.
21+
#
22+
# You can toggle Jaspr specific lint rules in the 'diagnostics' section below.
23+
plugins:
24+
jaspr_lints:
25+
version: ^0.6.0
26+
diagnostics:
27+
prefer_html_components: true
28+
sort_children_last: true
29+
styles_ordering: true
30+
31+
# Uncomment the following section to enable or disable additional rules.
32+
33+
# linter:
34+
# rules:
35+
# camel_case_types: true
36+
37+
# For more information about the core and recommended set of lints, see
38+
# https://dart.dev/go/core-lints
39+
40+
formatter:
41+
# Change this to your preferred line length.
42+
page_width: 120
43+
trailing_commas: preserve
44+
45+
# For additional information about configuring this file, see
46+
# https://dart.dev/guides/language/analysis-options
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
website: https://verygood.ventures
2+
devTools: https://developer.vgv.dev
3+
github: https://github.com/VeryGoodOpenSource/very_good_workflows

site_jaspr/content/_data/site.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Site Configuration
2+
titleBase: Very Good Workflows
3+
favicon: favicon.ico
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
title: Overview
3+
description: A collection of reusable GitHub workflows used at Very Good Ventures.
4+
image: /images/meta/open-graph.png
5+
---
6+
7+
# Overview
8+
9+
[GitHub workflows][github_workflows_link] are configurable, automated processes that can run at various points during the development process. For example, a workflow can run when a pull request is created or updated to perform various code quality checks before allowing the changes to be merged.
10+
11+
Very Good Workflows is a collection of workflows that we use at VGV to run automated checks in our CI pipelines. While built by VGV to be used internally, they can be used by anyone.
12+
13+
## Quick Start 🚀
14+
15+
To get started, add Very Good Workflows to an existing GitHub workflow:
16+
17+
```yaml
18+
# A reusable workflow for Dart packages
19+
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_package.yml@v1
20+
21+
# A reusable workflow for Flutter packages
22+
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
23+
24+
# A reusable workflow for ensuring commits are semantic
25+
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/semantic_pull_request.yml@v1
26+
27+
# A reusable workflow for verifying package scores on pub.dev
28+
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/pana.yml@v1
29+
30+
# A reusable workflow for running a spell check
31+
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/spell_check.yml@v1
32+
33+
# A reusable workflow for publishing Flutter packages
34+
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_pub_publish.yml@v1
35+
36+
# A reusable workflow for publishing Dart packages
37+
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_pub_publish.yml@v1
38+
39+
# A reusable workflow for publishing Mason bricks
40+
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/mason_publish.yml@v1
41+
42+
```
43+
44+
[github_workflows_link]: https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
45+
[very_good_ventures_link]: https://verygood.ventures
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: "Workflows"
3+
description: "Learn about all of the workflows that Very Good Workflows supports."
4+
---
5+
6+
# Workflows
7+
8+
Learn about all of the workflows that Very Good Workflows supports.
9+
10+
- [Dart Package](/docs/workflows/dart_package)
11+
- [Dart Pub Publish](/docs/workflows/dart_pub_publish)
12+
- [Flutter Package](/docs/workflows/flutter_package)
13+
- [Flutter Pub Publish](/docs/workflows/flutter_pub_publish)
14+
- [License Check](/docs/workflows/license_check)
15+
- [Mason Publish](/docs/workflows/mason_publish)
16+
- [Pana](/docs/workflows/pana)
17+
- [Semantic Pull Request](/docs/workflows/semantic_pull_request)
18+
- [Spell Check](/docs/workflows/spell_check)
Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
---
2+
title: Dart Package
3+
description: A reusable workflow for running checks on Dart packages.
4+
image: /images/meta/open-graph.png
5+
---
6+
7+
# Dart Package
8+
9+
This workflow runs helpful checks on a Dart package according to the steps below. As with any workflow, it can be customized.
10+
11+
## Steps
12+
13+
The Dart package workflow consists of the following steps:
14+
15+
1. Install dependencies
16+
2. Format
17+
3. Analyze
18+
4. Run tests
19+
5. Check code coverage
20+
21+
## Inputs
22+
23+
### `concurrency`
24+
25+
**Optional** The number of concurrent test suites run.
26+
27+
**Default** `4`
28+
29+
### `coverage_excludes`
30+
31+
**Optional** List of paths to exclude from the coverage report, separated by an empty space. Supports `globs` to describe file patterns.
32+
33+
**Default** `""`
34+
35+
### `dart_sdk`
36+
37+
**Optional** Which Dart SDK version to use. It can be a version (e.g. `3.5.0`) or a channel (e.g. `stable`):
38+
39+
**Default** `"stable"`
40+
41+
### `format_line_length`
42+
43+
**Optional** The preferred line length preferred for running the `dart format` command. Be aware that this does not change the behavior of the analysis step and longer lines could still make the workflow fail if the rule `lines_longer_than_80_chars` is used.
44+
45+
### `min_coverage`
46+
47+
**Optional** The minimum coverage percentage allowed.
48+
49+
**Default** 100
50+
51+
### `working_directory`
52+
53+
**Optional** The path to the root of the Dart package.
54+
55+
**Default** `"."`
56+
57+
### `analyze_directories`
58+
59+
**Optional** A space-separated list of folders that should be analyzed.
60+
61+
**Default** `"lib test"`
62+
63+
### `format_directories`
64+
65+
**Optional** A space-separated list of folders that should be formatted.
66+
67+
**Default** `"."`
68+
69+
### `check_ignore`
70+
71+
**Optional** Allows ignoring lines from [coverage](https://pub.dev/packages/coverage).
72+
73+
**Default** `false`
74+
75+
### `report_on`
76+
77+
**Optional** A comma-separated list of folders that should be checked in code coverage.
78+
79+
**Default** `"lib"`
80+
81+
### `runs_on`
82+
83+
**Optional** The operating system on which to run the workflow.
84+
85+
**Default** `"ubuntu-latest"`
86+
87+
### `setup`
88+
89+
**Optional** A command that should be executed immediately after dependencies are installed.
90+
91+
**Default** `""`
92+
93+
### `platform`
94+
95+
**Optional** A comma-separated list of platforms on which to run the tests.
96+
`[vm (default), chrome, firefox, safari, node]`
97+
98+
**Default** `"vm"`
99+
100+
### `run_skipped`
101+
102+
**Optional** Run skipped tests instead of skipping them.
103+
104+
**Default** `false`
105+
106+
### `no_example`
107+
108+
**Optional** To avoid getting packages in `example/` when running `dart pub get` (if it exists).
109+
110+
**Default** `false`
111+
112+
## Secrets
113+
114+
### `ssh_key`
115+
116+
**Optional** An SSH key used to access private repositories when installing dependencies.
117+
118+
## Example Usage
119+
120+
```yaml
121+
name: My Dart Workflow
122+
123+
on: pull_request
124+
125+
jobs:
126+
build:
127+
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_package.yml@v1
128+
with:
129+
coverage_excludes: '*.g.dart'
130+
dart_sdk: 'stable'
131+
platform: 'chrome,vm'
132+
working_directory: 'examples/my_dart_package'
133+
secrets:
134+
ssh_key: ${{secrets.EXAMPLE_KEY}}
135+
```
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
title: Dart Pub Publish
3+
description: A reusable workflow for publishing Dart packages to pub.dev.
4+
image: /images/meta/open-graph.png
5+
---
6+
7+
# Dart Pub Publish
8+
9+
We use this workflow to publish a Dart package to [pub.dev](https://pub.dev).
10+
11+
## Steps
12+
13+
The Dart Pub Publish workflow consists of the following steps:
14+
15+
1. Setup Dart, including pub.dev publish token
16+
2. Install dependencies
17+
3. Dry run
18+
4. Publish
19+
20+
This workflow uses the automated publishing of packages to pub.dev which is part of the [Dart documentation](https://dart.dev/tools/pub/automated-publishing). Before using this workflow ensure that you have configured your package on pub.dev correctly to allow the publish process to complete.
21+
22+
## Inputs
23+
24+
### `dart_sdk`
25+
26+
**Optional** Which Dart SDK version to use. It can be a version (e.g. `3.5.0`) or a channel (e.g. `stable`):
27+
28+
**Default** `"stable"`
29+
30+
### `working_directory`
31+
32+
**Optional** The path to the root of the Dart package.
33+
34+
**Default** `"."`
35+
36+
### `runs_on`
37+
38+
**Optional** An optional operating system on which to run the workflow.
39+
40+
**Default** `"ubuntu-latest"`
41+
42+
## Example Usage
43+
44+
```yaml
45+
name: My Dart Pub Publish Workflow
46+
47+
on: pull_request
48+
49+
jobs:
50+
build:
51+
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_pub_publish.yml@v1
52+
with:
53+
dart_sdk: 'stable'
54+
working_directory: 'packages/my_dart_package'
55+
```

0 commit comments

Comments
 (0)