Skip to content

Commit

Permalink
recator the CI to use per-package workflow config files
Browse files Browse the repository at this point in the history
  • Loading branch information
devoncarew committed Oct 25, 2024
1 parent 673428a commit 4f87e53
Show file tree
Hide file tree
Showing 19 changed files with 322 additions and 822 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"
---
26 changes: 9 additions & 17 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,25 @@
# This configures the .github/workflows/pull_request_label.yml workflow.
# Configuration for .github/workflows/pull_request_label.yml.

'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 4f87e53

Please sign in to comment.