famedlysdk/.gitlab-ci.yml

132 lines
3.3 KiB
YAML
Raw Normal View History

2019-06-09 10:16:48 +00:00
stages:
2019-06-09 12:33:25 +00:00
- coverage
2019-06-09 12:27:00 +00:00
- builddocs
2019-06-09 18:30:50 +00:00
- deploy
2019-06-09 10:16:48 +00:00
coverage:
tags:
- linux
stage: coverage
image: debian:testing
dependencies: []
script:
- apt update
2020-10-08 12:29:18 +00:00
- apt install -y curl gnupg2 git unzip
- git clone https://github.com/flutter/flutter.git -b stable
- export PATH="$PATH:`pwd`/flutter/bin"
- sed -i s/#//g pubspec.yaml
- flutter doctor
- apt update
2020-10-08 12:29:18 +00:00
- 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
2020-10-08 12:29:18 +00:00
- rm -r example
- su -c ./prepare.sh test
- su -c ./test.sh test
2020-05-19 09:28:13 +00:00
artifacts:
paths:
- coverage/
coverage_without_olm:
tags:
- linux
2019-06-09 10:16:48 +00:00
stage: coverage
image: debian:testing
2019-06-09 10:16:48 +00:00
dependencies: []
2020-05-09 13:24:14 +00:00
script:
- apt update
2020-06-09 10:10:23 +00:00
- apt install -y curl gnupg2 git sqlite3 libsqlite3-dev
- curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
- curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list
- apt update
- apt install -y dart
2020-05-09 13:24:14 +00:00
- ln -s /usr/lib/dart/bin/pub /usr/bin/
- useradd -m test
- chown -R 'test:' '.'
- chmod +x ./test.sh
- pub get
- pub run test
2020-08-21 09:02:20 +00:00
e2ee_test:
tags:
- linux
stage: coverage
image: debian:testing
dependencies: []
script:
- apt update
- apt install -y curl gnupg2 git
- curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
- curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list
- apt update
- apt install -y dart 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_driver.sh
- printf "abstract class TestUser {\n static const String homeserver = '$TEST_HOMESERVER';\n static const String username = '$TEST_USER1';\n static const String username2 = '$TEST_USER2';\n static const String password = '$TEST_USER_PASSWORD';\n}" > ./test_driver/test_config.dart
- su -c ./prepare.sh test
- su -c ./test_driver.sh test
timeout: 16m
resource_group: e2ee_test
2019-06-09 12:33:25 +00:00
code_analyze:
tags:
- docker
stage: coverage
image: cirrusci/flutter
dependencies: []
script:
2020-05-22 10:12:18 +00:00
- flutter format lib/ test/ test_driver/ --set-exit-if-changed
- flutter analyze
2020-08-21 09:02:20 +00:00
build_api_doc:
tags:
- docker
2019-06-09 12:27:00 +00:00
stage: builddocs
2019-06-09 12:19:49 +00:00
image: cirrusci/flutter
script:
2019-06-09 18:26:54 +00:00
- dartdoc --exclude "dart:async,dart:collection,dart:convert,dart:core,dart:developer,dart:io,dart:isolate,dart:math,dart:typed_data,dart:ui"
2019-06-09 12:27:00 +00:00
artifacts:
paths:
2019-06-09 12:34:28 +00:00
- doc/api/
2019-06-09 13:17:31 +00:00
only:
- main
2019-06-09 12:34:28 +00:00
2020-08-21 09:02:20 +00:00
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:
- main
2019-06-09 18:30:50 +00:00
pages:
tags:
- linux
2019-06-09 18:30:50 +00:00
stage: deploy
image: alpine:latest
2019-06-09 12:19:49 +00:00
script:
- mv doc/api/ ./home/api
- mv doc-public ./home/doc
- mv home public
2019-06-09 12:27:00 +00:00
dependencies:
2020-08-21 09:02:20 +00:00
- build_api_doc
- build_doc
2019-06-09 13:17:31 +00:00
artifacts:
paths:
- public
2019-06-09 13:17:31 +00:00
only:
2020-10-08 12:29:18 +00:00
- main