pass the provided root instead of the resolved root for project type … #28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: package:dart_mcp_server | |
| permissions: read-all | |
| on: | |
| # Run CI on all PRs (against any branch) and on pushes to the main branch. | |
| pull_request: | |
| paths: | |
| - '.github/workflows/dart_mcp_server.yaml' | |
| - 'pkgs/dart_mcp_server/**' | |
| - 'pkgs/dart_mcp/**' | |
| push: | |
| branches: [ main ] | |
| paths: | |
| - '.github/workflows/dart_mcp_server.yaml' | |
| - 'pkgs/dart_mcp_server/**' | |
| - 'pkgs/dart_mcp/**' | |
| schedule: | |
| - cron: '0 0 * * 0' # weekly | |
| defaults: | |
| run: | |
| working-directory: pkgs/dart_mcp_server | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| flutterSdk: [stable, master] | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
| # We need the flutter SDK in order to run the counter app for integration | |
| # testing. | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| channel: ${{ matrix.flutterSdk }} | |
| cache: true | |
| cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:" | |
| # Exposes the DART_SDK environment variable to all other actions. | |
| # https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#setting-an-environment-variable | |
| - run: echo "DART_SDK=$(which dart | xargs dirname | xargs dirname)" >> "$GITHUB_ENV" | |
| - name: fetch counter app deps | |
| working-directory: pkgs/dart_mcp_server/test_fixtures/counter_app | |
| run: flutter pub get | |
| - run: dart pub get | |
| - run: dart analyze --fatal-infos | |
| - run: dart format --output=none --set-exit-if-changed . | |
| if: ${{ matrix.flutterSdk == 'master' }} | |
| - run: dart test |