2021-04-16 02:47:35 +08:00
|
|
|
# This file is a template, and might need editing before it works on your project.
|
|
|
|
test:
|
|
|
|
stage: test
|
2021-09-02 10:48:20 +00:00
|
|
|
except:
|
|
|
|
- triage
|
2024-05-23 01:16:12 +08:00
|
|
|
image: "ghcr.io/cirruslabs/flutter:3.16.9"
|
2021-04-15 18:57:27 +00:00
|
|
|
before_script:
|
2022-07-24 15:54:21 +00:00
|
|
|
- apt-get update -qq && apt-get install -y -qq libsqlite3-dev
|
2022-07-16 03:00:46 +00:00
|
|
|
- flutter pub global activate junitreport
|
2021-04-15 18:57:27 +00:00
|
|
|
- export PATH="$PATH":"$HOME/.pub-cache/bin"
|
2021-04-16 02:47:35 +08:00
|
|
|
script:
|
2022-04-23 16:58:57 +08:00
|
|
|
- cd app
|
2021-04-15 18:57:27 +00:00
|
|
|
- flutter test --machine --coverage | tojunit -o report.xml
|
|
|
|
- lcov --summary coverage/lcov.info
|
|
|
|
- genhtml coverage/lcov.info --output=coverage
|
|
|
|
coverage: '/lines\.*: \d+\.\d+\%/'
|
|
|
|
artifacts:
|
|
|
|
name: coverage
|
|
|
|
paths:
|
2022-04-23 16:58:57 +08:00
|
|
|
- $CI_PROJECT_DIR/app/coverage
|
2021-04-15 18:57:27 +00:00
|
|
|
reports:
|
2022-04-23 09:53:50 +00:00
|
|
|
junit: app/report.xml
|
2021-10-09 20:51:57 +00:00
|
|
|
expire_in: 6 mos
|