Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename ecosystem testing package to canary #323

Merged
merged 3 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/canary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
name: "package:canary"
about: "Create a bug or file a feature request against package:canary."
labels: "package:canary"
---
2 changes: 1 addition & 1 deletion .github/test_repos/repos.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "../../pkgs/quest/schema.json",
"$schema": "../../pkgs/canary/schema.json",
"https://github.com/mosuem/my_app_old_web": {
"level": "analyze"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Ecosystem test
name: Canary

on:
workflow_call:
Expand All @@ -14,7 +14,7 @@ on:
required: false

jobs:
update_and_test:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand All @@ -28,16 +28,16 @@ jobs:

- run: echo "${{ toJSON(github.event.pull_request.labels.*.name) }}"

- name: Install firehose
run: dart pub global activate -s path pkgs/quest
- name: Install local version of `package:canary`
run: dart pub global activate -s path pkgs/canary
if: ${{ inputs.local_debug }}

- run: dart pub global activate -s git https://github.com/dart-lang/ecosystem.git --git-ref main --git-path pkgs/quest
- run: dart pub global activate -s git https://github.com/dart-lang/ecosystem.git --git-ref main --git-path pkgs/canary
if: ${{ !inputs.local_debug }}

- name: Update package and test
run: |
dart pub global run quest ${{ inputs.repos_file }} ${{ github.repositoryUrl }} ${{ github.head_ref || github.ref_name }} "${{ toJSON(github.event.pull_request.labels.*.name) }}"
dart pub global run canary ${{ inputs.repos_file }} ${{ github.repositoryUrl }} ${{ github.head_ref || github.ref_name }} "${{ toJSON(github.event.pull_request.labels.*.name) }}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Ecosystem test:Internal
name: Canary:Internal

on:
pull_request:
Expand All @@ -7,7 +7,7 @@ on:

jobs:
test_ecosystem:
uses: ./.github/workflows/ecosystem_test.yaml
uses: ./.github/workflows/canary.yaml
with:
repos_file: .github/test_repos/repos.json
local_debug: true
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
name: package:quest
name: package:canary

permissions: read-all

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

defaults:
run:
working-directory: pkgs/quest
working-directory: pkgs/canary

env:
GH_TOKEN: ${{ github.token }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/post_summaries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
workflows:
- Publish:Internal
- Health:Internal
- Ecosystem test:Internal
- Canary:Internal
types:
- completed

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ This repository is home to general Dart Ecosystem tools and packages.
| Package | Description | Version |
| --- | --- | --- |
| [blast_repo](pkgs/blast_repo/) | A tool to bulk validate and fix GitHub repos. | |
| [canary](pkgs/canary/) | Test package upgrades against the ecosystem. | |
| [corpus](pkgs/corpus/) | A tool to calculate the API usage for a package. | |
| [dart_flutter_team_lints](pkgs/dart_flutter_team_lints/) | An analysis rule set used by the Dart and Flutter teams. | [![pub package](https://img.shields.io/pub/v/dart_flutter_team_lints.svg)](https://pub.dev/packages/dart_flutter_team_lints) |
| [firehose](pkgs/firehose/) | A tool to automate publishing of Pub packages from GitHub actions. | [![pub package](https://img.shields.io/pub/v/firehose.svg)](https://pub.dev/packages/firehose) |
Expand Down
File renamed without changes.
File renamed without changes.
16 changes: 7 additions & 9 deletions pkgs/quest/README.md → pkgs/canary/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Quest: Ecosystem Testing for Dart Packages
Embark your package on a quest of testing against a suite of applications. This helps identify potential breaking changes introduced by package updates, ensuring seamless integration across the ecosystem.
# Canary: Ecosystem Testing for Dart Packages
Before publishing, send a canary out to test a package against a suite of applications. This helps identify potential breaking changes introduced by package updates, ensuring seamless integration across the ecosystem.

## What does it do?
It checks if your package upgrade would result in failures in the ecosystem. This is achieved by running the following pseudocode:
Expand Down Expand Up @@ -35,9 +35,9 @@ for (final app in applicationSuite) {
}
```

2. Add a workflow file with the following contents:
2. Add a workflow file `canary.yaml` with the following contents:
```yaml
name: Ecosystem test
name: Canary

on:
pull_request:
Expand All @@ -46,12 +46,12 @@ on:

jobs:
test_ecosystem:
uses: dart-lang/ecosystem/.github/workflows/ecosystem_test.yaml@main
uses: dart-lang/ecosystem/.github/workflows/canary.yaml@main
with:
repos_file: .github/test_repos/repos.json
```

3. To show the markdown result as a comment, also add a workflow file
3. To show the markdown result as a comment, also add a workflow file `post_summaries.yaml`
```yaml
name: Comment on the pull request

Expand All @@ -60,9 +60,7 @@ on:
# do things like create comments on the PR, even if the original workflow couldn't.
workflow_run:
workflows:
- Health
- Publish
- Ecosystem test
- Canary
types:
- completed

Expand Down
File renamed without changes.
Loading
Loading