Skip to content

Other CI systems

On any other CI, run the steps of every pipeline (Pipelines) as a shell script.

Terminal window
dart pub get
ASSAY_VERSION=$(sed -n '/^ assay_lints:$/,/^ [a-z]/s/^ version: "\(.*\)"$/\1/p' pubspec.lock)
dart pub global activate assay_cli "$ASSAY_VERSION"
export PATH="$PATH:${PUB_CACHE:-$HOME/.pub-cache}/bin"
SNAPSHOTS=/srv/ci/assay-snapshots/my_app/ # a directory that the runs share
dart test --coverage-path=coverage/lcov.info
assay gate --coverage coverage/lcov.info --duplication --snapshot "$SNAPSHOTS" --reporter console --reporter sarif:build/assay.sarif || verdict=$?
assay metrics --coverage coverage/lcov.info --snapshot "$SNAPSHOTS"
assay trend "$SNAPSHOTS" --reporter console --reporter html:build/assay-trend.html
exit "${verdict:-0}"

The pull request job passes --compare-with "$SNAPSHOTS". To keep one .jsonl file instead of a directory, see Other CI systems on the page of the snapshots.

The script keeps the exit code of assay gate and ends with it:

Exit code Meaning
0 pass
1 fail
2 configuration or usage error
3 could not run