From 3d06648734bad92a13ad6195243b0adfff812bc0 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Thu, 7 Nov 2024 09:01:20 -0800 Subject: [PATCH 1/2] add direct links to the package issue trackers --- .github/ISSUE_TEMPLATE/appengine.md | 5 ++ .../{appengine.yml => gcloud.md} | 0 .github/ISSUE_TEMPLATE/gcloud.yml | 5 -- ...nization.yml => native_synchronization.md} | 0 .github/labeler.yml | 8 +-- .github/workflows/appengine.yml | 37 ++++++----- .github/workflows/gcloud.yml | 63 +++++-------------- .github/workflows/native_synchronization.yml | 56 +++++------------ README.md | 10 +-- pkgs/appengine/pubspec.yaml | 1 + pkgs/gcloud/pubspec.yaml | 1 + pkgs/native_synchronization/pubspec.yaml | 1 + 12 files changed, 72 insertions(+), 115 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/appengine.md rename .github/ISSUE_TEMPLATE/{appengine.yml => gcloud.md} (100%) delete mode 100644 .github/ISSUE_TEMPLATE/gcloud.yml rename .github/ISSUE_TEMPLATE/{native_synchronization.yml => native_synchronization.md} (100%) diff --git a/.github/ISSUE_TEMPLATE/appengine.md b/.github/ISSUE_TEMPLATE/appengine.md new file mode 100644 index 00000000..357ba7f3 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/appengine.md @@ -0,0 +1,5 @@ +--- +name: "package:appengine" +about: "Create a bug or file a feature request against package:appengine." +labels: "package:appengine" +--- diff --git a/.github/ISSUE_TEMPLATE/appengine.yml b/.github/ISSUE_TEMPLATE/gcloud.md similarity index 100% rename from .github/ISSUE_TEMPLATE/appengine.yml rename to .github/ISSUE_TEMPLATE/gcloud.md diff --git a/.github/ISSUE_TEMPLATE/gcloud.yml b/.github/ISSUE_TEMPLATE/gcloud.yml deleted file mode 100644 index 4bd17751..00000000 --- a/.github/ISSUE_TEMPLATE/gcloud.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -name: "package:gcloud" -about: "Create a bug or file a feature request against package:gcloud." -labels: "package:gcloud" ---- diff --git a/.github/ISSUE_TEMPLATE/native_synchronization.yml b/.github/ISSUE_TEMPLATE/native_synchronization.md similarity index 100% rename from .github/ISSUE_TEMPLATE/native_synchronization.yml rename to .github/ISSUE_TEMPLATE/native_synchronization.md diff --git a/.github/labeler.yml b/.github/labeler.yml index 4084dcd4..4b27bf84 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -2,16 +2,16 @@ 'type-infra': - changed-files: - - any-glob-to-any-file: '.github/**' + - any-glob-to-any-file: '.github/**' 'package:appengine': - changed-files: - - any-glob-to-any-file: 'pkgs/appengine/**' + - any-glob-to-any-file: 'pkgs/appengine/**' 'package:gcloud': - changed-files: - - any-glob-to-any-file: 'pkgs/gcloud/**' + - any-glob-to-any-file: 'pkgs/gcloud/**' 'package:native_synchronization': - changed-files: - - any-glob-to-any-file: 'pkgs/native_synchronization/**' + - any-glob-to-any-file: 'pkgs/native_synchronization/**' diff --git a/.github/workflows/appengine.yml b/.github/workflows/appengine.yml index 1cb3677d..c28c4aec 100644 --- a/.github/workflows/appengine.yml +++ b/.github/workflows/appengine.yml @@ -1,13 +1,15 @@ name: package:appengine + permissions: read-all on: - pull_request: + # Run CI on pushes to the main branch, and on PRs against main. + push: branches: [ main ] paths: - '.github/workflows/appengine.yml' - 'pkgs/appengine/**' - push: + pull_request: branches: [ main ] paths: - '.github/workflows/appengine.yml' @@ -15,26 +17,29 @@ on: schedule: - cron: '0 0 * * 0' # weekly +defaults: + run: + working-directory: pkgs/appengine + jobs: build: runs-on: ubuntu-latest - defaults: - run: - working-directory: pkgs/appengine - + strategy: + fail-fast: false + matrix: + sdk: [stable, dev] steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 + with: + sdk: ${{ matrix.sdk }} - - name: Install dependencies - run: dart pub get - - # Disabled - this would format ~492 files. - # - name: Verify formatting - # run: dart format --output=none --set-exit-if-changed . + - run: dart pub get - - name: Analyze project source - run: dart analyze --fatal-infos + - run: dart analyze --fatal-infos + + # Disabled - this would format ~492 files. + # - run: dart format --output=none --set-exit-if-changed . + # if: ${{ matrix.sdk == 'stable' }} - - name: Run tests - run: dart test + - run: dart test diff --git a/.github/workflows/gcloud.yml b/.github/workflows/gcloud.yml index 460c9fca..8a5778d4 100644 --- a/.github/workflows/gcloud.yml +++ b/.github/workflows/gcloud.yml @@ -1,13 +1,15 @@ name: package:gcloud + permissions: read-all on: - pull_request: + # Run CI on pushes to the main branch, and on PRs against main. + push: branches: [ main ] paths: - '.github/workflows/gcloud.yml' - 'pkgs/gcloud/**' - push: + pull_request: branches: [ main ] paths: - '.github/workflows/gcloud.yml' @@ -15,59 +17,28 @@ on: schedule: - cron: '0 0 * * 0' # weekly -env: - PUB_ENVIRONMENT: bot.github +defaults: + run: + working-directory: pkgs/gcloud jobs: - # Check code formatting and static analysis on a single OS (linux) - # against Dart dev. - analyze: + build: runs-on: ubuntu-latest - defaults: - run: - working-directory: pkgs/gcloud strategy: fail-fast: false matrix: - sdk: [dev] + sdk: [stable, dev] steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: ${{ matrix.sdk }} - - id: install - name: Install dependencies - run: dart pub get - - name: Check formatting - run: dart format --output=none --set-exit-if-changed . - if: always() && steps.install.outcome == 'success' - - name: Analyze code - run: dart analyze --fatal-infos - if: always() && steps.install.outcome == 'success' - # Run tests on a matrix consisting of two dimensions: - # 1. OS: ubuntu-latest, (macos-latest, windows-latest) - # 2. release channel: dev - test: - needs: analyze - runs-on: ${{ matrix.os }} - defaults: - run: - working-directory: pkgs/gcloud - strategy: - fail-fast: false - matrix: - # Add macos-latest and/or windows-latest if relevant for this package. - os: [ubuntu-latest] - sdk: [3.0.0, dev] - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 - with: - sdk: ${{ matrix.sdk }} - - id: install - name: Install dependencies - run: dart pub get - - name: Run VM tests - run: dart test --platform vm -P ci - if: always() && steps.install.outcome == 'success' + - 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 diff --git a/.github/workflows/native_synchronization.yml b/.github/workflows/native_synchronization.yml index 24f07c8c..762b9885 100644 --- a/.github/workflows/native_synchronization.yml +++ b/.github/workflows/native_synchronization.yml @@ -1,13 +1,15 @@ name: package:native_synchronization + permissions: read-all on: - pull_request: + # Run CI on pushes to the main branch, and on PRs against main. + push: branches: [ main ] paths: - '.github/workflows/native_synchronization.yml' - 'pkgs/native_synchronization/**' - push: + pull_request: branches: [ main ] paths: - '.github/workflows/native_synchronization.yml' @@ -15,52 +17,28 @@ on: schedule: - cron: '0 0 * * 0' # weekly +defaults: + run: + working-directory: pkgs/native_synchronization + jobs: - analyze: - runs-on: ${{ matrix.os }} - defaults: - run: - working-directory: pkgs/native_synchronization + build: + runs-on: ubuntu-latest strategy: + fail-fast: false matrix: - os: [ubuntu-latest] - sdk: [dev, stable] - + sdk: [stable, dev] steps: - # These are the latest versions of the github actions; dependabot will - # send PRs to keep these up-to-date. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: ${{ matrix.sdk }} - - name: Install dependencies - run: dart pub get - - - name: Verify formatting - run: dart format --output=none --set-exit-if-changed . + - run: dart pub get - - name: Analyze project source - run: dart analyze --fatal-infos - - test: - needs: analyze - runs-on: ${{ matrix.os }} - defaults: - run: - working-directory: pkgs/native_synchronization - strategy: - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - sdk: [dev, stable] - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 - with: - sdk: ${{ matrix.sdk }} + - run: dart analyze --fatal-infos - - name: Install dependencies - run: dart pub get + - run: dart format --output=none --set-exit-if-changed . + if: ${{ matrix.sdk == 'stable' }} - - name: Run tests - run: dart test + - run: dart test diff --git a/README.md b/README.md index 661d4e2a..26a2fb9e 100644 --- a/README.md +++ b/README.md @@ -5,11 +5,11 @@ This repository is home to various Dart packages under the ## Packages -| Package | Description | Version | -|---|---|---| -| [appengine](pkgs/appengine/) | Support for using Dart as a custom runtime on Google App Engine Flexible Environment. | [![pub package](https://img.shields.io/pub/v/appengine.svg)](https://pub.dev/packages/appengine) | -| [gcloud](pkgs/gcloud/) | High level idiomatic Dart API for Google Cloud Storage, Pub-Sub and Datastore. | [![pub package](https://img.shields.io/pub/v/gcloud.svg)](https://pub.dev/packages/gcloud) | -| [native_synchronization](pkgs/native_synchronization/) | Low level synchronization primitives built on dart:ffi. | [![pub package](https://img.shields.io/pub/v/native_synchronization.svg)](https://pub.dev/packages/native_synchronization) | +| Package | Description | Issues | Version | +| --- | --- | --- | --- | +| [appengine](pkgs/appengine/) | Support for using Dart as a custom runtime on Google App Engine Flexible Environment. | [![package issues](https://img.shields.io/badge/package:appengine-4774bc)](null) | [![pub package](https://img.shields.io/pub/v/appengine.svg)](https://pub.dev/packages/appengine) | +| [gcloud](pkgs/gcloud/) | High level idiomatic Dart API for Google Cloud Storage, Pub-Sub and Datastore. | [![package issues](https://img.shields.io/badge/package:gcloud-4774bc)](null) | [![pub package](https://img.shields.io/pub/v/gcloud.svg)](https://pub.dev/packages/gcloud) | +| [native_synchronization](pkgs/native_synchronization/) | Low level synchronization primitives built on dart:ffi. | [![package issues](https://img.shields.io/badge/package:native_synchronization-4774bc)](null) | [![pub package](https://img.shields.io/pub/v/native_synchronization.svg)](https://pub.dev/packages/native_synchronization) | ## Publishing automation diff --git a/pkgs/appengine/pubspec.yaml b/pkgs/appengine/pubspec.yaml index e4557d42..d092d9f8 100644 --- a/pkgs/appengine/pubspec.yaml +++ b/pkgs/appengine/pubspec.yaml @@ -4,6 +4,7 @@ description: >- Support for using Dart as a custom runtime on Google App Engine Flexible Environment. repository: https://github.com/dart-lang/labs/tree/main/pkgs/appengine +issue_tracker: https://github.com/dart-lang/labs/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Aappengine topics: - cloud diff --git a/pkgs/gcloud/pubspec.yaml b/pkgs/gcloud/pubspec.yaml index 576c92c2..76d1751e 100644 --- a/pkgs/gcloud/pubspec.yaml +++ b/pkgs/gcloud/pubspec.yaml @@ -3,6 +3,7 @@ version: 0.8.16 description: >- High level idiomatic Dart API for Google Cloud Storage, Pub-Sub and Datastore. repository: https://github.com/dart-lang/labs/tree/main/pkgs/gcloud +issue_tracker: https://github.com/dart-lang/labs/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Agcloud topics: - cloud diff --git a/pkgs/native_synchronization/pubspec.yaml b/pkgs/native_synchronization/pubspec.yaml index 0c8b098d..5d829398 100644 --- a/pkgs/native_synchronization/pubspec.yaml +++ b/pkgs/native_synchronization/pubspec.yaml @@ -2,6 +2,7 @@ name: native_synchronization description: Low level synchronization primitives built on dart:ffi. version: 0.3.1 repository: https://github.com/dart-lang/labs/tree/main/pkgs/native_synchronization +issue_tracker: https://github.com/dart-lang/labs/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Anative_synchronization environment: sdk: ">=3.0.0 <4.0.0" From da5b6bf6df6d13e98b9da6cf2df9796a97a43405 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Thu, 7 Nov 2024 09:20:15 -0800 Subject: [PATCH 2/2] Update gcloud.yml --- .github/workflows/gcloud.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gcloud.yml b/.github/workflows/gcloud.yml index 8a5778d4..4e399069 100644 --- a/.github/workflows/gcloud.yml +++ b/.github/workflows/gcloud.yml @@ -41,4 +41,4 @@ jobs: - run: dart format --output=none --set-exit-if-changed . if: ${{ matrix.sdk == 'stable' }} - - run: dart test + - run: dart test --platform vm -P ci