105 lines
2.2 KiB
YAML
105 lines
2.2 KiB
YAML
stages:
|
|
- coverage
|
|
- builddocs
|
|
- deploy
|
|
|
|
coverage:
|
|
tags:
|
|
- linux
|
|
stage: coverage
|
|
image: debian:testing
|
|
dependencies: []
|
|
script:
|
|
- apt update
|
|
- apt install -y curl gnupg2 git
|
|
- curl https://storage.googleapis.com/dart-archive/channels/stable/release/2.7.2/linux_packages/dart_2.7.2-1_amd64.deb > dart.deb
|
|
- apt install -y ./dart.deb
|
|
- apt update
|
|
- apt install -y chromium lcov libolm3 sqlite3 libsqlite3-dev
|
|
- ln -s /usr/lib/dart/bin/pub /usr/bin/
|
|
- useradd -m test
|
|
- chown -R 'test:' '.'
|
|
- chmod +x ./prepare.sh
|
|
- chmod +x ./test.sh
|
|
- su -c ./prepare.sh test
|
|
- su -c ./test.sh test
|
|
artifacts:
|
|
paths:
|
|
- coverage/
|
|
|
|
|
|
coverage_without_olm:
|
|
tags:
|
|
- linux
|
|
stage: coverage
|
|
image: debian:testing
|
|
coverage: '/^\s+lines.+: (\d+.\d*%)/'
|
|
dependencies: []
|
|
script:
|
|
- apt update
|
|
- apt install -y curl git sqlite3 libsqlite3-dev
|
|
- curl https://storage.googleapis.com/dart-archive/channels/stable/release/2.7.2/linux_packages/dart_2.7.2-1_amd64.deb > dart.deb
|
|
- apt install -y ./dart.deb
|
|
- ln -s /usr/lib/dart/bin/pub /usr/bin/
|
|
- useradd -m test
|
|
- chown -R 'test:' '.'
|
|
- chmod +x ./test.sh
|
|
- pub get
|
|
- pub run test
|
|
|
|
code_analyze:
|
|
tags:
|
|
- docker
|
|
stage: coverage
|
|
image: cirrusci/flutter
|
|
dependencies: []
|
|
script:
|
|
- flutter format lib/ test/ test_driver/ --set-exit-if-changed
|
|
- flutter analyze
|
|
|
|
build-api-doc:
|
|
tags:
|
|
- docker
|
|
stage: builddocs
|
|
image: cirrusci/flutter
|
|
script:
|
|
- dartdoc --exclude "dart:async,dart:collection,dart:convert,dart:core,dart:developer,dart:io,dart:isolate,dart:math,dart:typed_data,dart:ui"
|
|
artifacts:
|
|
paths:
|
|
- doc/api/
|
|
only:
|
|
- master
|
|
|
|
build-doc:
|
|
tags:
|
|
- docker
|
|
stage: builddocs
|
|
image: registry.gitlab.com/larodar/mdbook-dtmo:latest
|
|
script:
|
|
- cd doc
|
|
- mdbook-dtmo build -d public
|
|
- mv public ../doc-public
|
|
artifacts:
|
|
paths:
|
|
- doc-public
|
|
only:
|
|
- master
|
|
|
|
pages:
|
|
tags:
|
|
- linux
|
|
stage: deploy
|
|
image: alpine:latest
|
|
script:
|
|
- mv doc/api/ ./home/api
|
|
- mv doc-public ./home/doc
|
|
- mv home public
|
|
dependencies:
|
|
- build-api-doc
|
|
- build-doc
|
|
artifacts:
|
|
paths:
|
|
- public
|
|
only:
|
|
- master
|
|
|