mirror of
https://github.com/nextcloud/android.git
synced 2024-11-24 14:15:44 +03:00
Run analysis workflow in github actions
Signed-off-by: Álvaro Brey Vilas <alvaro.brey@nextcloud.com>
This commit is contained in:
parent
eaf1230d2e
commit
9fa63c7547
4 changed files with 23 additions and 53 deletions
51
.drone.yml
51
.drone.yml
|
@ -163,58 +163,7 @@ trigger:
|
|||
event:
|
||||
- push
|
||||
- pull_request
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: analysis
|
||||
|
||||
steps:
|
||||
- name: analysis
|
||||
image: ghcr.io/nextcloud/continuous-integration-android8:2
|
||||
environment:
|
||||
GIT_USERNAME:
|
||||
from_secret: GIT_USERNAME
|
||||
GIT_TOKEN:
|
||||
from_secret: GIT_TOKEN
|
||||
LOG_USERNAME:
|
||||
from_secret: LOG_USERNAME
|
||||
LOG_PASSWORD:
|
||||
from_secret: LOG_PASSWORD
|
||||
commands:
|
||||
- scripts/checkIfRunDrone.sh $GIT_USERNAME $GIT_TOKEN $DRONE_PULL_REQUEST || exit 0
|
||||
- export BRANCH=$(scripts/analysis/getBranchName.sh $GIT_USERNAME $GIT_TOKEN $DRONE_PULL_REQUEST)
|
||||
- scripts/analysis/analysis-wrapper.sh $GIT_USERNAME $GIT_TOKEN $BRANCH $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER $DRONE_PULL_REQUEST
|
||||
|
||||
- name: notify
|
||||
image: drillster/drone-email
|
||||
settings:
|
||||
port: 587
|
||||
from: nextcloud-drone@kaminsky.me
|
||||
recipients_only: true
|
||||
username:
|
||||
from_secret: EMAIL_USERNAME
|
||||
password:
|
||||
from_secret: EMAIL_PASSWORD
|
||||
recipients:
|
||||
from_secret: EMAIL_RECIPIENTS
|
||||
host:
|
||||
from_secret: EMAIL_HOST
|
||||
when:
|
||||
event:
|
||||
- push
|
||||
status:
|
||||
- failure
|
||||
branch:
|
||||
- master
|
||||
- stable-*
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- master
|
||||
- stable-*
|
||||
event:
|
||||
- push
|
||||
- pull_request
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
|
|
21
.github/workflows/analysis.yml
vendored
Normal file
21
.github/workflows/analysis.yml
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
name: "Analysis"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ master, stable-* ]
|
||||
|
||||
jobs:
|
||||
analysis:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: "adopt"
|
||||
java-version: 11
|
||||
- name: Run analysis wrapper
|
||||
run: |
|
||||
mkdir -p $HOME/.gradle
|
||||
echo "org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError" > $HOME/.gradle/gradle.properties
|
||||
scripts/analysis/analysis-wrapper.sh ${{ secrets.GIT_USERNAME }} ${{ secrets.GIT_TOKEN }} $GITHUB_REF ${{ secrets.LOG_USERNAME }} ${{ secrets.LOG_PASSWORD }} $GITHUB_RUN_NUMBER ${{ github.event.pull_request.number }}
|
|
@ -39,7 +39,7 @@ require 'open3'
|
|||
begin
|
||||
gem "xml-simple"
|
||||
rescue LoadError
|
||||
system("gem install xml-simple")
|
||||
system("gem install --user-install xml-simple")
|
||||
Gem.clear_paths
|
||||
end
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ require 'open3'
|
|||
begin
|
||||
gem "xml-simple"
|
||||
rescue LoadError
|
||||
system("gem install xml-simple")
|
||||
system("gem install --user-install xml-simple")
|
||||
Gem.clear_paths
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue