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

Initial wip implementation of new code excerpter #201

Merged
merged 11 commits into from
Apr 10, 2024
68 changes: 56 additions & 12 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ jobs:
- name: mono_repo self validate
run: dart pub global run mono_repo generate --validate
job_002:
name: "analyzer_and_format; Dart 3.3.0; PKGS: packages/code_excerpt_updater, packages/code_excerpter, packages/inject_dartpad; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos .`"
name: "analyzer_and_format; Dart 3.3.0; PKGS: packages/code_excerpt_updater, packages/code_excerpter, packages/excerpter, packages/inject_dartpad; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos .`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:packages/code_excerpt_updater-packages/code_excerpter-packages/inject_dartpad;commands:format-analyze"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:packages/code_excerpt_updater-packages/code_excerpter-packages/excerpter-packages/inject_dartpad;commands:format-analyze"
restore-keys: |
os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:packages/code_excerpt_updater-packages/code_excerpter-packages/inject_dartpad
os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:packages/code_excerpt_updater-packages/code_excerpter-packages/excerpter-packages/inject_dartpad
os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
Expand Down Expand Up @@ -85,6 +85,19 @@ jobs:
run: dart analyze --fatal-infos .
if: "always() && steps.packages_code_excerpter_pub_upgrade.conclusion == 'success'"
working-directory: packages/code_excerpter
- id: packages_excerpter_pub_upgrade
name: packages/excerpter; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: packages/excerpter
- name: "packages/excerpter; dart format --output=none --set-exit-if-changed ."
run: "dart format --output=none --set-exit-if-changed ."
if: "always() && steps.packages_excerpter_pub_upgrade.conclusion == 'success'"
working-directory: packages/excerpter
- name: "packages/excerpter; dart analyze --fatal-infos ."
run: dart analyze --fatal-infos .
if: "always() && steps.packages_excerpter_pub_upgrade.conclusion == 'success'"
working-directory: packages/excerpter
- id: packages_inject_dartpad_pub_upgrade
name: packages/inject_dartpad; dart pub upgrade
run: dart pub upgrade
Expand All @@ -99,16 +112,16 @@ jobs:
if: "always() && steps.packages_inject_dartpad_pub_upgrade.conclusion == 'success'"
working-directory: packages/inject_dartpad
job_003:
name: "analyzer_and_format; Dart dev; PKGS: packages/code_excerpt_updater, packages/code_excerpter, packages/inject_dartpad; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos .`"
name: "analyzer_and_format; Dart dev; PKGS: packages/code_excerpt_updater, packages/code_excerpter, packages/excerpter, packages/inject_dartpad; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos .`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:packages/code_excerpt_updater-packages/code_excerpter-packages/inject_dartpad;commands:format-analyze"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:packages/code_excerpt_updater-packages/code_excerpter-packages/excerpter-packages/inject_dartpad;commands:format-analyze"
restore-keys: |
os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:packages/code_excerpt_updater-packages/code_excerpter-packages/inject_dartpad
os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:packages/code_excerpt_updater-packages/code_excerpter-packages/excerpter-packages/inject_dartpad
os:ubuntu-latest;pub-cache-hosted;sdk:dev
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
Expand Down Expand Up @@ -145,6 +158,19 @@ jobs:
run: dart analyze --fatal-infos .
if: "always() && steps.packages_code_excerpter_pub_upgrade.conclusion == 'success'"
working-directory: packages/code_excerpter
- id: packages_excerpter_pub_upgrade
name: packages/excerpter; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: packages/excerpter
- name: "packages/excerpter; dart format --output=none --set-exit-if-changed ."
run: "dart format --output=none --set-exit-if-changed ."
if: "always() && steps.packages_excerpter_pub_upgrade.conclusion == 'success'"
working-directory: packages/excerpter
- name: "packages/excerpter; dart analyze --fatal-infos ."
run: dart analyze --fatal-infos .
if: "always() && steps.packages_excerpter_pub_upgrade.conclusion == 'success'"
working-directory: packages/excerpter
- id: packages_inject_dartpad_pub_upgrade
name: packages/inject_dartpad; dart pub upgrade
run: dart pub upgrade
Expand All @@ -159,16 +185,16 @@ jobs:
if: "always() && steps.packages_inject_dartpad_pub_upgrade.conclusion == 'success'"
working-directory: packages/inject_dartpad
job_004:
name: "unit_test; Dart 3.3.0; PKGS: packages/code_excerpt_updater, packages/code_excerpter; `dart test`"
name: "unit_test; Dart 3.3.0; PKGS: packages/code_excerpt_updater, packages/code_excerpter, packages/excerpter; `dart test`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:packages/code_excerpt_updater-packages/code_excerpter;commands:test"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:packages/code_excerpt_updater-packages/code_excerpter-packages/excerpter;commands:test"
restore-keys: |
os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:packages/code_excerpt_updater-packages/code_excerpter
os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:packages/code_excerpt_updater-packages/code_excerpter-packages/excerpter
os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
Expand Down Expand Up @@ -197,21 +223,30 @@ jobs:
run: dart test
if: "always() && steps.packages_code_excerpter_pub_upgrade.conclusion == 'success'"
working-directory: packages/code_excerpter
- id: packages_excerpter_pub_upgrade
name: packages/excerpter; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: packages/excerpter
- name: packages/excerpter; dart test
run: dart test
if: "always() && steps.packages_excerpter_pub_upgrade.conclusion == 'success'"
working-directory: packages/excerpter
needs:
- job_001
- job_002
- job_003
job_005:
name: "unit_test; Dart dev; PKGS: packages/code_excerpt_updater, packages/code_excerpter; `dart test`"
name: "unit_test; Dart dev; PKGS: packages/code_excerpt_updater, packages/code_excerpter, packages/excerpter; `dart test`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:packages/code_excerpt_updater-packages/code_excerpter;commands:test"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:packages/code_excerpt_updater-packages/code_excerpter-packages/excerpter;commands:test"
restore-keys: |
os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:packages/code_excerpt_updater-packages/code_excerpter
os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:packages/code_excerpt_updater-packages/code_excerpter-packages/excerpter
os:ubuntu-latest;pub-cache-hosted;sdk:dev
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
Expand Down Expand Up @@ -240,6 +275,15 @@ jobs:
run: dart test
if: "always() && steps.packages_code_excerpter_pub_upgrade.conclusion == 'success'"
working-directory: packages/code_excerpter
- id: packages_excerpter_pub_upgrade
name: packages/excerpter; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: packages/excerpter
- name: packages/excerpter; dart test
run: dart test
if: "always() && steps.packages_excerpter_pub_upgrade.conclusion == 'success'"
working-directory: packages/excerpter
needs:
- job_001
- job_002
Expand Down
4 changes: 2 additions & 2 deletions mono_repo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ github:
- cron: "0 0 * * 0"

merge_stages:
- analyzer_and_format
- unit_test
- analyzer_and_format
- unit_test
2 changes: 2 additions & 0 deletions packages/excerpter/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.dart_tool/
pubspec.lock
3 changes: 3 additions & 0 deletions packages/excerpter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 0.1.0

- Initial experimental version for testing on dart.dev.
21 changes: 21 additions & 0 deletions packages/excerpter/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License

Copyright (c) 2017 Dart Project Authors <https://dart.dev>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Loading
Loading