fix: Added package:coverage as dev dependency to fix pipeline. #9
This file contains 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 CI | |
on: | |
push: | |
paths: | |
- ".github/workflows/**" | |
- "src/cli_gen/**" | |
- "src/cli_annotations/**" | |
pull_request: | |
paths: | |
- ".github/workflows/**" | |
- "src/cli_gen/**" | |
- "src/cli_annotations/**" | |
schedule: | |
- cron: "0 0 * * 0" # Run weekly checks | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
package: | |
- src/cli_gen | |
# - src/cli_annotations | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: "3.19.x" | |
channel: "beta" | |
- name: Install dependencies | |
run: dart pub get | |
working-directory: ${{ matrix.package }} | |
- name: Run static analysis | |
run: dart analyze | |
working-directory: ${{ matrix.package }} | |
- name: Run code coverage | |
run: dart test --coverage="coverage" | |
working-directory: ${{ matrix.package }} | |
- name: Code coverage | |
run: dart run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --report-on=lib | |
working-directory: ${{ matrix.package }} | |
# dependency_bot: | |
# runs-on: ubuntu-latest | |
# if: github.event_name == 'schedule' | |
# strategy: | |
# matrix: | |
# package: | |
# - src/cli_gen | |
# - src/cli_annotations | |
# steps: | |
# - uses: actions/checkout@v2 | |
# with: | |
# ref: "dependency_bot/${{ github.run_id }}" | |
# fetch-depth: 0 | |
# - name: Setup Dart | |
# uses: dart-lang/setup-dart@v1 | |
# - name: Upgrade dependencies | |
# run: cd ${{ matrix.package }} && dart pub upgrade | |
# - name: Create Pull Request | |
# uses: peter-evans/create-pull-request@v3 | |
# with: | |
# commit-message: "Update dependencies for ${{ matrix.package }}" | |
# branch: "dependency_bot/${{ matrix.package }}" | |
# title: "Update dependencies for ${{ matrix.package }}" | |
# body: "This is an auto-generated PR with dependency updates." | |
# labels: "dependencies,auto-update" | |
# base: "main" # Change this to your default branch if not main | |
# signoff: false |