feat: add specialized review, documentation, and CLI skills plus known adopters resource #251
Workflow file for this run
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: dart_skills_lint | |
| permissions: read-all | |
| on: | |
| pull_request: | |
| paths: | |
| - 'skills/**' | |
| - 'tool/dart_skills_lint/**' | |
| - '.github/workflows/dart_skills_lint_workflow.yaml' | |
| push: | |
| branches: [ main ] | |
| paths: | |
| - 'skills/**' | |
| - 'tool/dart_skills_lint/**' | |
| - '.github/workflows/dart_skills_lint_workflow.yaml' | |
| schedule: | |
| - cron: '0 0 * * 0' # weekly | |
| defaults: | |
| run: | |
| working-directory: tool/dart_skills_lint | |
| jobs: | |
| analyze_and_test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dart-lang/setup-dart@v1 | |
| with: | |
| sdk: stable | |
| - run: dart pub get | |
| - run: dart analyze --fatal-infos | |
| - name: Run cyclomatic complexity check | |
| run: dart run dart_code_linter:metrics analyze lib test | |
| - run: dart test | |
| coverage: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dart-lang/setup-dart@v1 | |
| with: | |
| sdk: stable | |
| - run: dart pub get | |
| - name: Collect coverage | |
| run: dart test --coverage=coverage | |
| - name: Format coverage to LCOV | |
| run: dart run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --report-on=lib | |
| # Action steps do not inherit defaults.run.working-directory, so this | |
| # path is relative to the repository root. | |
| - name: Enforce coverage threshold | |
| uses: VeryGoodOpenSource/very_good_coverage@c953fca3e24a915e111cc6f55f03f756dcb3964c # v3 | |
| with: | |
| path: tool/dart_skills_lint/coverage/lcov.info | |
| min_coverage: 73 | |
| exclude: '**/*.g.dart' | |
| validate_skills: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dart-lang/setup-dart@v1 | |
| with: | |
| sdk: stable | |
| - run: dart pub get | |
| - name: Validate skills | |
| run: dart run dart_skills_lint:cli | |
| formatting: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dart-lang/setup-dart@v1 | |
| with: | |
| sdk: stable | |
| - run: dart pub get | |
| - run: dart format --output=none --set-exit-if-changed . | |
| pana_score: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dart-lang/setup-dart@v1 | |
| with: | |
| sdk: stable | |
| - run: dart pub get | |
| - name: Install pana | |
| run: dart pub global activate pana | |
| # pana --exit-code-threshold N fails the step when | |
| # (max - granted) > N. Threshold 0 means any point drop fails; | |
| # current package score is 160/160 and we want to keep it there. | |
| - name: Pana score gate (160/160 required) | |
| run: dart pub global run pana --no-warning --exit-code-threshold 0 . |