Skip to content

Commit

Permalink
refactor the CI to use per-package workflow config files (#312)
Browse files Browse the repository at this point in the history
- 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>
  • Loading branch information
devoncarew authored Oct 28, 2024
1 parent 673428a commit 66ddc4f
Show file tree
Hide file tree
Showing 19 changed files with 317 additions and 813 deletions.
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/repo_manage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
name: "package:repo_manage"
about: "Create a bug or file a feature request against package:repo_manage."
labels: "package:repo_manage"
---
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/trebuchet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
name: "package:trebuchet"
about: "Create a bug or file a feature request against package:trebuchet."
labels: "package:trebuchet"
---
18 changes: 9 additions & 9 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
# This configures the .github/workflows/pull_request_label.yml workflow.
# This configures the .github/workflows/pull_request_label.yml workflow.

'type-infra':
- changed-files:
- any-glob-to-any-file: '.github/**'
- '.github/**'

'package:blast_repo':
- changed-files:
- any-glob-to-any-file: 'pkgs/blast_repo/**/*'
- 'pkgs/blast_repo/**'

'package:corpus':
- changed-files:
- any-glob-to-any-file: 'pkgs/corpus/**/*'
- 'pkgs/corpus/**'

'package:dart_flutter_team_lints':
- changed-files:
- any-glob-to-any-file: 'pkgs/dart_flutter_team_lints/**/*'
- 'pkgs/dart_flutter_team_lints/**'

'package:firehose':
- changed-files:
- any-glob-to-any-file: 'pkgs/firehose/**/*'
- 'pkgs/firehose/**'

'package:repo_manage':
- changed-files:
- any-glob-to-any-file: 'pkgs/repo_manage/**/*'
- 'pkgs/repo_manage/**'

'package:sdk_triage_bot':
- changed-files:
- any-glob-to-any-file: 'pkgs/sdk_triage_bot/**/*'
- 'pkgs/sdk_triage_bot/**'

'package:trebuchet':
- changed-files:
- any-glob-to-any-file: 'pkgs/trebuchet/**/*'
- 'pkgs/trebuchet/**'
43 changes: 43 additions & 0 deletions .github/workflows/blast_repo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: package:blast_repo

permissions: read-all

on:
pull_request:
branches: [ main ]
paths:
- '.github/workflows/blast_repo.yml'
- 'pkgs/blast_repo/**'
push:
branches: [ main ]
paths:
- '.github/workflows/blast_repo.yml'
- 'pkgs/blast_repo/**'
schedule:
- cron: '0 0 * * 0' # weekly

defaults:
run:
working-directory: pkgs/blast_repo

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sdk: [stable, dev]
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
with:
sdk: ${{ matrix.sdk }}

- run: dart pub get

- run: dart analyze --fatal-infos

- run: dart format --output=none --set-exit-if-changed .
if: ${{ matrix.sdk == 'stable' }}

- run: dart test
43 changes: 43 additions & 0 deletions .github/workflows/corpus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: package:corpus

permissions: read-all

on:
pull_request:
branches: [ main ]
paths:
- '.github/workflows/corpus.yml'
- 'pkgs/corpus/**'
push:
branches: [ main ]
paths:
- '.github/workflows/corpus.yml'
- 'pkgs/corpus/**'
schedule:
- cron: '0 0 * * 0' # weekly

defaults:
run:
working-directory: pkgs/corpus

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sdk: [stable, dev]
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
with:
sdk: ${{ matrix.sdk }}

- run: dart pub get

- run: dart analyze --fatal-infos

- run: dart format --output=none --set-exit-if-changed .
if: ${{ matrix.sdk == 'stable' }}

- run: dart test
Loading

0 comments on commit 66ddc4f

Please sign in to comment.