Skip to content

Commit 66ddc4f

Browse files
authored
refactor the CI to use per-package workflow config files (#312)
- refactor the CI to use per-package workflow config files --- - [x] I’ve reviewed the contributor guide and applied the relevant portions to this PR. <details> <summary>Contribution guidelines:</summary><br> - See our [contributor guide](https://github.com/dart-lang/.github/blob/main/CONTRIBUTING.md) for general expectations for PRs. - Larger or significant changes should be discussed in an issue before creating a PR. - Contributions to our repos should follow the [Dart style guide](https://dart.dev/guides/language/effective-dart) and use `dart format`. - Most changes should add an entry to the changelog and may need to [rev the pubspec package version](https://github.com/dart-lang/sdk/blob/main/docs/External-Package-Maintenance.md#making-a-change). - Changes to packages require [corresponding tests](https://github.com/dart-lang/.github/blob/main/CONTRIBUTING.md#Testing). Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback. </details>
1 parent 673428a commit 66ddc4f

19 files changed

+317
-813
lines changed

.github/ISSUE_TEMPLATE/repo_manage.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
name: "package:repo_manage"
3+
about: "Create a bug or file a feature request against package:repo_manage."
4+
labels: "package:repo_manage"
5+
---

.github/ISSUE_TEMPLATE/trebuchet.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
name: "package:trebuchet"
3+
about: "Create a bug or file a feature request against package:trebuchet."
4+
labels: "package:trebuchet"
5+
---

.github/labeler.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
# This configures the .github/workflows/pull_request_label.yml workflow.
1+
# This configures the .github/workflows/pull_request_label.yml workflow.
22

33
'type-infra':
44
- changed-files:
5-
- any-glob-to-any-file: '.github/**'
5+
- '.github/**'
66

77
'package:blast_repo':
88
- changed-files:
9-
- any-glob-to-any-file: 'pkgs/blast_repo/**/*'
9+
- 'pkgs/blast_repo/**'
1010

1111
'package:corpus':
1212
- changed-files:
13-
- any-glob-to-any-file: 'pkgs/corpus/**/*'
13+
- 'pkgs/corpus/**'
1414

1515
'package:dart_flutter_team_lints':
1616
- changed-files:
17-
- any-glob-to-any-file: 'pkgs/dart_flutter_team_lints/**/*'
17+
- 'pkgs/dart_flutter_team_lints/**'
1818

1919
'package:firehose':
2020
- changed-files:
21-
- any-glob-to-any-file: 'pkgs/firehose/**/*'
21+
- 'pkgs/firehose/**'
2222

2323
'package:repo_manage':
2424
- changed-files:
25-
- any-glob-to-any-file: 'pkgs/repo_manage/**/*'
25+
- 'pkgs/repo_manage/**'
2626

2727
'package:sdk_triage_bot':
2828
- changed-files:
29-
- any-glob-to-any-file: 'pkgs/sdk_triage_bot/**/*'
29+
- 'pkgs/sdk_triage_bot/**'
3030

3131
'package:trebuchet':
3232
- changed-files:
33-
- any-glob-to-any-file: 'pkgs/trebuchet/**/*'
33+
- 'pkgs/trebuchet/**'

.github/workflows/blast_repo.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: package:blast_repo
2+
3+
permissions: read-all
4+
5+
on:
6+
pull_request:
7+
branches: [ main ]
8+
paths:
9+
- '.github/workflows/blast_repo.yml'
10+
- 'pkgs/blast_repo/**'
11+
push:
12+
branches: [ main ]
13+
paths:
14+
- '.github/workflows/blast_repo.yml'
15+
- 'pkgs/blast_repo/**'
16+
schedule:
17+
- cron: '0 0 * * 0' # weekly
18+
19+
defaults:
20+
run:
21+
working-directory: pkgs/blast_repo
22+
23+
jobs:
24+
build:
25+
runs-on: ubuntu-latest
26+
strategy:
27+
fail-fast: false
28+
matrix:
29+
sdk: [stable, dev]
30+
steps:
31+
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
32+
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
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.sdk == 'stable' }}
42+
43+
- run: dart test

.github/workflows/corpus.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: package:corpus
2+
3+
permissions: read-all
4+
5+
on:
6+
pull_request:
7+
branches: [ main ]
8+
paths:
9+
- '.github/workflows/corpus.yml'
10+
- 'pkgs/corpus/**'
11+
push:
12+
branches: [ main ]
13+
paths:
14+
- '.github/workflows/corpus.yml'
15+
- 'pkgs/corpus/**'
16+
schedule:
17+
- cron: '0 0 * * 0' # weekly
18+
19+
defaults:
20+
run:
21+
working-directory: pkgs/corpus
22+
23+
jobs:
24+
build:
25+
runs-on: ubuntu-latest
26+
strategy:
27+
fail-fast: false
28+
matrix:
29+
sdk: [stable, dev]
30+
steps:
31+
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
32+
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
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.sdk == 'stable' }}
42+
43+
- run: dart test

0 commit comments

Comments
 (0)