Skip to content

Merge pull request #4 from pattobrien/tests/goldens #39

Merge pull request #4 from pattobrien/tests/goldens

Merge pull request #4 from pattobrien/tests/goldens #39

Workflow file for this run

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 }}
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: pattobrien/cli-gen
directory: ${{ matrix.package }}/coverage/
verbose: true
# 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