refactor: migrate to workspaces (#3135)

This commit is contained in:
Felix Angelov
2025-06-02 15:17:00 -05:00
committed by GitHub
parent 022198ee27
commit 3cd40de211
38 changed files with 210 additions and 2184 deletions
+5 -8
View File
@@ -37,6 +37,10 @@ inputs:
required: false
default: "vm"
description: Platform to use when running tests
workspace_root:
required: false
default: "."
description: The root of the project workspace (if using Dart workspaces)
runs:
using: "composite"
@@ -61,19 +65,12 @@ runs:
shell: ${{ inputs.shell }}
run: dart analyze --fatal-warnings ${{inputs.analyze_directories}}
- name: 📄 License Check
working-directory: ${{ inputs.working_directory }}
shell: ${{ inputs.shell }}
run: |
dart pub global activate very_good_cli
very_good packages check licenses --allowed="MIT,BSD-3-Clause,BSD-2-Clause,Apache-2.0"
- name: 🧪 Test
working-directory: ${{ inputs.working_directory }}
shell: ${{ inputs.shell }}
run: |
dart pub global activate coverage
dart test -j ${{inputs.concurrency}} --coverage=coverage --platform=${{inputs.platform}} && dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --packages=.dart_tool/package_config.json --report-on=${{inputs.report_on}} --check-ignore
dart test -j ${{inputs.concurrency}} --coverage=coverage --platform=${{inputs.platform}} && dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --packages=${{inputs.workspace_root}}/.dart_tool/package_config.json --report-on=${{inputs.report_on}} --check-ignore
# Per https://stackoverflow.com/questions/73402042/github-action-expressions-split-string
- name: 🔗 Split package name
+33
View File
@@ -0,0 +1,33 @@
name: License Check Workflow
description: Check licenses.
inputs:
dart_sdk:
required: false
default: "stable"
description: "The dart sdk version to use"
working_directory:
required: false
default: "."
description: The working directory for this workflow
runs:
using: "composite"
steps:
- name: 🎯 Setup Dart
uses: dart-lang/setup-dart@v1
with:
sdk: ${{ inputs.dart_sdk }}
- name: 📦 Install Dependencies
working-directory: ${{ inputs.working_directory }}
shell: ${{ inputs.shell }}
run: dart pub get
- name: 📄 License Check
working-directory: ${{ inputs.working_directory }}
shell: ${{ inputs.shell }}
run: |
# https://github.com/VeryGoodOpenSource/very_good_cli/issues/1260
dart pub global activate -sgit https://github.com/VeryGoodOpenSource/very_good_cli.git --git-ref 5acb9d2cb35085d007be7dbd97499db444eb3d56
very_good packages check licenses --allowed="MIT,BSD-3-Clause,BSD-2-Clause,Apache-2.0" --dependency-type="direct-main,transitive"
+16
View File
@@ -11,6 +11,18 @@ on:
- main
jobs:
license_check:
name: 📄 License Check
runs-on: ubuntu-latest
steps:
- name: 📚 Git Checkout
uses: actions/checkout@v4
- name: 👀 Check Licenses
uses: ./.github/actions/license_check
with:
working_directory: ${{ github.workspace }}
semantic_pull_request:
name: ✅ Semantic Pull Request
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/semantic_pull_request.yml@v1
@@ -134,6 +146,7 @@ jobs:
with:
codecov_token: ${{ secrets.CODECOV_TOKEN }}
working_directory: packages/${{ matrix.package }}
workspace_root: ${{ github.workspace }}
build_cross_platform_dart_packages:
needs: changes
@@ -157,6 +170,7 @@ jobs:
with:
codecov_token: ${{ secrets.CODECOV_TOKEN }}
working_directory: packages/${{ matrix.package }}
workspace_root: ${{ github.workspace }}
build_redis:
needs: changes
@@ -186,6 +200,7 @@ jobs:
with:
codecov_token: ${{ secrets.CODECOV_TOKEN }}
working_directory: packages/${{ matrix.package }}
workspace_root: ${{ github.workspace }}
verify_packages:
needs: changes
@@ -211,6 +226,7 @@ jobs:
ci:
needs:
[
license_check,
semantic_pull_request,
build_cross_platform_dart_packages,
build_dart_packages,