feat(studio): added studio as first-class generation target #171
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| dart-tests: | |
| name: Dart Tests & Coverage | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: stable | |
| - name: Cache pub dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.pub-cache | |
| key: ${{ runner.os }}-pub-stable-${{ hashFiles('**/pubspec.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pub-stable- | |
| ${{ runner.os }}-pub- | |
| - name: Install dependencies | |
| run: | | |
| dart pub get | |
| cd example && flutter pub get && cd .. | |
| - name: Analyze project | |
| run: dart analyze --fatal-infos | |
| - name: Run tests with coverage | |
| run: dart test --coverage=coverage | |
| - name: Generate lcov report | |
| run: | | |
| dart run coverage:format_coverage \ | |
| --lcov \ | |
| --in=coverage \ | |
| --out=coverage/lcov.info \ | |
| --packages=.dart_tool/package_config.json \ | |
| --report-on=lib | |
| - name: Validate coverage file exists | |
| run: | | |
| ls -la coverage || true | |
| if [ ! -f coverage/lcov.info ]; then | |
| echo "ERROR: coverage/lcov.info not found"; exit 1; fi | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| with: | |
| files: coverage/lcov.info | |
| fail_ci_if_error: false | |
| studio-tests: | |
| name: Studio Tests & Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: stable | |
| - name: Install Dart dependencies | |
| run: dart pub get | |
| - name: Generate API docs | |
| run: dart doc | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| cache-dependency-path: analytics-gen-studio/package-lock.json | |
| - name: Install dependencies | |
| working-directory: analytics-gen-studio | |
| run: npm ci | |
| - name: Run tests | |
| working-directory: analytics-gen-studio | |
| run: npm test | |
| - name: Type check | |
| working-directory: analytics-gen-studio | |
| run: npx tsc -b | |
| - name: Build | |
| working-directory: analytics-gen-studio | |
| run: npm run build |