Skip to content

Commit

Permalink
Merge pull request nextcloud#9688 from nextcloud/chore/analysis-gh-ac…
Browse files Browse the repository at this point in the history
…tions

Run analysis workflow in github actions
  • Loading branch information
AlvaroBrey authored Jan 13, 2022
2 parents 49b6d0c + 9fa63c7 commit acf575e
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 53 deletions.
51 changes: 0 additions & 51 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: [email protected]
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
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
@@ -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 }}
2 changes: 1 addition & 1 deletion scripts/analysis/findbugs-up.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
begin
gem "xml-simple"
rescue LoadError
system("gem install xml-simple")
system("gem install --user-install xml-simple")
Gem.clear_paths
end

Expand Down
2 changes: 1 addition & 1 deletion scripts/analysis/lint-up.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
begin
gem "xml-simple"
rescue LoadError
system("gem install xml-simple")
system("gem install --user-install xml-simple")
Gem.clear_paths
end

Expand Down

0 comments on commit acf575e

Please sign in to comment.