From 21b1a2964cc624cde0dc310afe2ea8775f07af93 Mon Sep 17 00:00:00 2001 From: Jan Romann Date: Mon, 22 Nov 2021 18:16:14 +0100 Subject: [PATCH] ci: add Gitlab CI configuration --- .gitlab-ci.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..cbf2dd36 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,30 @@ +# https://hub.docker.com/r/google/dart +image: google/dart:latest + +variables: + PUB_VARS: "--platform vm --timeout 30s --concurrency=6 --test-randomize-ordering-seed=random --reporter=expanded" + +# Cache downloaded dependencies and plugins between builds. +# To keep cache across branches add 'key: "$CI_JOB_NAME"' +cache: + paths: + - .pub-cache/global_packages + +before_script: + - export PATH="$PATH":"~/.pub-cache/bin" + - pub get --no-precompile + +style_check: + stage: test + script: + - dart format -o none --set-exit-if-changed . + +lint: + stage: test + script: + - dart analyze . + +test: + stage: test + script: + - dart test $PUB_VARS