This commit is contained in:
parent
c458871569
commit
163c5453fb
40
.drone.yml
40
.drone.yml
@ -3,6 +3,23 @@ type: docker
|
|||||||
name: test
|
name: test
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Lint
|
||||||
|
failure: ignore
|
||||||
|
detach: true
|
||||||
|
image: mingc/android-build-box:latest
|
||||||
|
commands:
|
||||||
|
- echo "---------------------------------------------------------"
|
||||||
|
- echo "Install linters..."
|
||||||
|
- curl -sSLO https://github.com/pinterest/ktlint/releases/download/1.0.0/ktlint && chmod a+x ktlint && mv ktlint /usr/local/bin/
|
||||||
|
- curl -sSLO https://github.com/detekt/detekt/releases/download/v1.23.1/detekt-cli-1.23.1.zip && unzip detekt-cli-1.23.1.zip
|
||||||
|
- echo "---------------------------------------------------------"
|
||||||
|
- echo "Detecting..."
|
||||||
|
- ./detekt-cli-1.23.1/bin/detekt-cli --all-rules
|
||||||
|
- echo "---------------------------------------------------------"
|
||||||
|
- echo "Linting... (this hangs)"
|
||||||
|
- ktlint 2>&1 /dev/null
|
||||||
|
- echo "---------------------------------------------------------"
|
||||||
|
command_timeout: 5m
|
||||||
- name: BuildAndTest
|
- name: BuildAndTest
|
||||||
image: mingc/android-build-box:latest
|
image: mingc/android-build-box:latest
|
||||||
commands:
|
commands:
|
||||||
@ -10,28 +27,9 @@ steps:
|
|||||||
- echo "Configure gradle..."
|
- echo "Configure gradle..."
|
||||||
- mkdir -p ~/.gradle && echo "org.gradle.daemon=false\nignoreGitVersion=true\npushCache=false\nsystemProp.org.gradle.internal.http.connectionTimeout=180000\nsystemProp.org.gradle.internal.http.socketTimeout=180000" >> ~/.gradle/gradle.properties
|
- mkdir -p ~/.gradle && echo "org.gradle.daemon=false\nignoreGitVersion=true\npushCache=false\nsystemProp.org.gradle.internal.http.connectionTimeout=180000\nsystemProp.org.gradle.internal.http.socketTimeout=180000" >> ~/.gradle/gradle.properties
|
||||||
- echo "---------------------------------------------------------"
|
- echo "---------------------------------------------------------"
|
||||||
- echo "Building..."
|
- echo "Building and testing..."
|
||||||
- ./gradlew build -x test
|
- ./gradlew build
|
||||||
- echo "---------------------------------------------------------"
|
- echo "---------------------------------------------------------"
|
||||||
- echo "Testing..."
|
|
||||||
- echo "---------------------------------------------------------"
|
|
||||||
- ./gradlew koverMergedXmlReport
|
|
||||||
environment:
|
|
||||||
TZ: Europe/Paris
|
|
||||||
SONAR_HOST_URL:
|
|
||||||
from_secret: sonarScannerHostUrl
|
|
||||||
SONAR_LOGIN:
|
|
||||||
from_secret: sonarScannerLogin
|
|
||||||
- name: Analyse
|
|
||||||
image: kytay/sonar-node-plugin
|
|
||||||
settings:
|
|
||||||
sonar_host:
|
|
||||||
from_secret: sonarScannerHostUrl
|
|
||||||
sonar_token:
|
|
||||||
from_secret: sonarScannerLogin
|
|
||||||
use_node_version: 16.18.1
|
|
||||||
sonar_debug: true
|
|
||||||
sonar_project_settings: ./sonar-project.properties
|
|
||||||
trigger:
|
trigger:
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
|
Loading…
Reference in New Issue
Block a user