This repository has been archived on 2020-06-04. You can view files and clone it, but cannot push or open issues or pull requests.
GitNex/.drone.yml
opyale f1eb632d9b CI: Adding basic formatting tests (#509)
better names

Using dedicated eclint image

Reconfiguring editorconfig

Removing intellij-specific configuration and making adjustments.

Final improvements

Minor improvements.

end_of_line = lf

Adding basic formatting tests.

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: gitnex/GitNex#509
Reviewed-by: 6543 <6543@noreply.gitea.io>
2020-05-27 18:09:55 +00:00

99 lines
1.9 KiB
YAML

---
kind: pipeline
type: docker
name: tests
steps:
- name: unit-tests
image: nextcloudci/android:android-49
depends_on: [ clone ]
commands:
- ./gradlew test
- name: check-formatting
image: odannyc/eclint:latest
depends_on: [ clone ]
commands:
- git pull origin master
- eclint check $(git diff --name-only origin/master)
# This may be used in the future, because it makes of intellij's native code inspection/formatting capabilities.
# Additional information: https://www.jetbrains.com/help/idea/command-line-formatter.html
#
# - name: do-or-check-formatting
# image: dlsniper/docker-intellij
# depends_on: [ clone ]
# commands:
# - /opt/intellij/bin/idea.sh inspect/format ...
trigger:
event:
- pull_request
---
kind: pipeline
type: docker
name: code-analysis
steps:
- name: check-global-formatting
image: odannyc/eclint:latest
depends_on: [ clone ]
commands:
- eclint check $(git ls-files)
trigger:
event:
- push
branch:
- master
---
kind: pipeline
type: docker
name: build
steps:
- name: build
image: nextcloudci/android:android-49
commands:
- ./gradlew build
- name: sign
image: nextcloudci/android:android-49
environment:
TOKEN:
from_secret: BOT_TOKEN
KS_PASS:
from_secret: KS_PASS
KEY_PASS:
from_secret: KEY_PASS
OUTPUT: signed.apk
GITEA: https://gitea.com
KS_FILE: ci_keystore.jks
KS_REPO:
from_secret: KS_REPO
commands:
- ./scripts/sign-build.sh
- name: publish
image: vividboarder/drone-webdav
username: GitNexBot
file: 'signed.apk'
destination: 'https://cloud.swatian.com/remote.php/dav/files/GitNexBot/GitNex-Builds/latest.apk'
custom_arguments: '--progress-bar'
timeout: 180
attempts: 5
environment:
PLUGIN_PASSWORD:
from_secret: NC_TOKEN
trigger:
event:
- push
branch:
- master