dev_build.dart

Build Status

IO utility run_ci

There is a convenient way to run a validation test on your package:

  • analyze
  • format
  • test

It handles VM, web and flutter projects.

Run without activation

run_ci can be ran directly from pub.dev without activating the package:

# Run common validation test on the current package (and nested packages)
dart run dev_build:run_ci@

# Any run_ci option can be used
dart run dev_build:run_ci@ --fix --recursive

Install

# Once (and to upgrade), installs a compiled `run_ci` on the PATH (Dart 3.10+)
dart install dev_build

run_ci --version

Activation (legacy, still supported):

# Once only
dart pub global activate dev_build
# Run common validation test (analyzer, format, test) on your package (and nested packages)
pub global run dev_build:run_ci

# Run common validation tests on another package (and nested packages)
pub global run dev_build:run_ci <path>

# You might run it simply (if global pub path is in your paths)
run_ci

# Perform recursively a pub downgrade and analyze.
run_ci --pub-downgrade --analyze --no-override --recursive

# Perform dart fix --apply and format recursively
run_ci --fix --recursive
  • By default it also checks subfolder projects (i.e. you can run it at the top of your repo)
  • You can override the behavior by creating a 'tool/run_ci_override.dart' file
  • You can skip a folder by creating an empty placeholder file '.local/.skip_run_ci'
  • You can filter the folders scanned recursively with a dev_build_run_ci_config.yaml file, it applies to its folder and sub folders (paths relative to the file, the files above the <path> argument are ignored):
# Only look for packages in these sub folders (default to all)
include:
  - packages
  - example
# Don't look for packages in these folders, use `.` to skip this folder
exclude:
  - example/legacy