Skip to content

Commit 224fd0e

Browse files
authored
contribute a CI (#3)
* contribute a CI * add a markdown badge
1 parent ecd5bdd commit 224fd0e

File tree

11 files changed

+100
-25
lines changed

11 files changed

+100
-25
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
name: "package:dash_analytics"
3+
about: "Create a bug or file a feature request against package:dash_analytics."
4+
labels: "package:dash_analytics"
5+
---

.github/dependabot.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Dependabot configuration file.
2+
version: 2
3+
4+
updates:
5+
- package-ecosystem: "github-actions"
6+
directory: "/"
7+
schedule:
8+
interval: "monthly"

.github/labeler.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Configuration for .github/workflows/pull_request_label.yml.
2+
3+
'infra':
4+
- '.github/**'
5+
6+
'package:dash_analytics':
7+
- 'pkgs/dash_analytics/**'
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: package:dash_analytics
2+
permissions: read-all
3+
4+
on:
5+
pull_request:
6+
branches: [ main ]
7+
paths:
8+
- '.github/workflows/dash_analytics.yml'
9+
- 'pkgs/dash_analytics/**'
10+
push:
11+
branches: [ main ]
12+
paths:
13+
- '.github/workflows/dash_analytics.yml'
14+
- 'pkgs/dash_analytics/**'
15+
schedule:
16+
- cron: '0 0 * * 0' # weekly
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
defaults:
22+
run:
23+
working-directory: pkgs/dash_analytics
24+
strategy:
25+
matrix:
26+
sdk: [stable, dev] # {pkgs.versions}
27+
include:
28+
- sdk: stable
29+
run-tests: true
30+
steps:
31+
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
32+
- uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d
33+
with:
34+
sdk: ${{matrix.sdk}}
35+
36+
- run: dart pub get
37+
38+
- run: dart analyze --fatal-infos
39+
40+
- run: dart format --output=none --set-exit-if-changed .
41+
if: ${{matrix.run-tests}}
42+
43+
- run: dart test
44+
if: ${{matrix.run-tests}}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# This workflow applies labels to pull requests based on the paths that are
2+
# modified in the pull request.
3+
#
4+
# Edit `.github/labeler.yml` to configure labels. For more information, see
5+
# https://github.com/actions/labeler.
6+
7+
name: Pull Request Labeler
8+
permissions: read-all
9+
10+
on:
11+
pull_request_target
12+
13+
jobs:
14+
label:
15+
permissions:
16+
pull-requests: write
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/labeler@5c7539237e04b714afd8ad9b4aed733815b9fab4
20+
with:
21+
repo-token: "${{ secrets.GITHUB_TOKEN }}"
22+
sync-labels: true

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ This repository is home to tooling related Dart packages.
77
## Packages
88

99
| Package | Description | Version |
10-
|---|---|---|
10+
| --- | --- | --- |
11+
| [dash_analytics](pkgs/dash_analytics/) | A package for logging analytics for all dash related tooling to Google Analytics | <!-- [![pub package](https://img.shields.io/pub/v/dash_analytics.svg)](https://pub.dev/packages/dash_analytics) --> |
1112

1213
## Publishing automation
1314

mono_repo.yaml

Lines changed: 0 additions & 15 deletions
This file was deleted.

pkgs/dash_analytics/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[![package:dash_analytics](https://github.com/dart-lang/tools/actions/workflows/dash_analytics.yml/badge.svg)](https://github.com/dart-lang/tools/actions/workflows/dash_analytics.yml)
2+
13
## What's This?
24

35
This package is intended to be used on Dash (Flutter, Dart, etc.) related tooling only.
@@ -7,4 +9,4 @@ This is not intended to be general purpose or consumed by the community. It is r
79

810
## Using This Package As A Dash Tool
911

10-
Refer to the [guide](USAGE_GUIDE.md)
12+
Refer to the [guide](USAGE_GUIDE.md).

pkgs/dash_analytics/USAGE_GUIDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,4 +157,4 @@ Explanation of the each key above
157157
- endDateTime: the latest, most recent event that was sent
158158
- sessionCount: count of sessions; sessions have a minimum time of 30 minutes
159159
- flutterChannelCount: count of flutter channels (can be 0 if developer is a Dart dev only)
160-
- toolCount: count of the dash tools sending analytics
160+
- toolCount: count of the dash tools sending analytics

pkgs/dash_analytics/pubspec.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
name: dash_analytics
2-
description: A package for logging analytics for all dash related tooling to Google Analytics
2+
description: >-
3+
A package for logging analytics for all dash related tooling to Google
4+
Analytics.
35
version: 0.1.0
4-
repository: https://github.com/dart-lang/tools
6+
repository: https://github.com/dart-lang/tools/tree/main/pkgs/dash_analytics
57

68
environment:
79
sdk: '>=2.19.0 <3.0.0'

0 commit comments

Comments
 (0)