Skip to content

Commit

Permalink
Initial implementation of new code excerpter
Browse files Browse the repository at this point in the history
  • Loading branch information
parlough committed Dec 12, 2023
1 parent 7bdf338 commit 86d09bb
Show file tree
Hide file tree
Showing 32 changed files with 2,353 additions and 23 deletions.
113 changes: 103 additions & 10 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Created with package:mono_repo v6.6.0
# Created with package:mono_repo v6.6.1
name: Dart CI
on:
push:
Expand Down Expand Up @@ -35,7 +35,7 @@ jobs:
name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: mono_repo self validate
run: dart pub global activate mono_repo 6.6.0
run: dart pub global activate mono_repo 6.6.1
- name: mono_repo self validate
run: dart pub global run mono_repo generate --validate
job_002:
Expand Down Expand Up @@ -86,16 +86,50 @@ jobs:
if: "always() && steps.packages_code_excerpter_pub_upgrade.conclusion == 'success'"
working-directory: packages/code_excerpter
job_003:
name: "analyzer_and_format; Dart dev; PKGS: packages/code_excerpt_updater, packages/code_excerpter; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos .`"
name: "analyzer_and_format; Dart 3.2.0; PKG: packages/excerpter; `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@704facf57e6136b1bc63b828d79edcd491f0ee84
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:packages/code_excerpt_updater-packages/code_excerpter;commands:format-analyze"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0;packages:packages/excerpter;commands:format-analyze"
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:3.2.0;packages:packages/excerpter
os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Dart SDK
uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1
with:
sdk: "3.2.0"
- id: checkout
name: Checkout repository
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
- 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
job_004:
name: "analyzer_and_format; Dart dev; PKGS: packages/code_excerpt_updater, packages/code_excerpter, packages/excerpter; `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@704facf57e6136b1bc63b828d79edcd491f0ee84
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:packages/code_excerpt_updater-packages/code_excerpter-packages/excerpter;commands:format-analyze"
restore-keys: |
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 @@ -132,7 +166,20 @@ jobs:
run: dart analyze --fatal-infos .
if: "always() && steps.packages_code_excerpter_pub_upgrade.conclusion == 'success'"
working-directory: packages/code_excerpter
job_004:
- 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
job_005:
name: "unit_test; Dart 3.1.0; PKGS: packages/code_excerpt_updater, packages/code_excerpter; `dart test`"
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -175,17 +222,53 @@ jobs:
- job_001
- job_002
- job_003
job_005:
name: "unit_test; Dart dev; PKGS: packages/code_excerpt_updater, packages/code_excerpter; `dart test`"
- job_004
job_006:
name: "unit_test; Dart 3.2.0; PKG: packages/excerpter; `dart test`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0;packages:packages/excerpter;commands:test"
restore-keys: |
os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0;packages:packages/excerpter
os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Dart SDK
uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1
with:
sdk: "3.2.0"
- id: checkout
name: Checkout repository
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
- 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_004
job_007:
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@704facf57e6136b1bc63b828d79edcd491f0ee84
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 @@ -214,7 +297,17 @@ 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_004
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

0 comments on commit 86d09bb

Please sign in to comment.