-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PIMOB-2183: Add github actions and remove duplicated steps from bitri…
…se.yml
- Loading branch information
1 parent
acd5902
commit 3c8ff54
Showing
4 changed files
with
106 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Send SonarQube Report | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
types: [ opened, synchronize, reopened ] | ||
branches: [ master, "bugfix/*", "feature/*", "release/*" ] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
name: Build Jacoco Test Report for :checkout | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup Environment | ||
uses: ./.github/workflows/setup-env.yml | ||
|
||
- name: Build Jacoco Test Report for :checkout | ||
run: ./gradlew :checkout:jacocoTestReport | ||
|
||
- name: Build Jacoco Test Report for :frames | ||
run: ./gradlew :frames:jacocoTestReport | ||
|
||
- name: Send SonarQube Report | ||
run: | | ||
#!/usr/bin/env bash | ||
# fail if any commands fails | ||
set -e | ||
# debug log | ||
set -x | ||
# Run sonarqube script | ||
./scripts/sonar.sh| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Setup Environment | ||
|
||
jobs: | ||
setup: | ||
name: Setup Environment | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: 11 | ||
distribution: corretto | ||
cache: gradle | ||
|
||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Verify Pull Request | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
types: [ opened, synchronize, reopened ] | ||
branches: [ master, "bugfix/*", "feature/*", "release/*" ] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
lint: | ||
name: Code Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup Environment | ||
uses: ./.github/workflows/setup-env.yml | ||
|
||
- name: Run Ktlint | ||
run: ./gradlew ktlintCheck | ||
|
||
- name: Run Android Lint | ||
run: ./gradlew lint | ||
|
||
build: | ||
name: Build the App | ||
runs-on: ubuntu-latest | ||
needs: lint | ||
steps: | ||
- name: Setup Environment | ||
uses: ./.github/workflows/setup-env.yml | ||
|
||
- name: Build with Gradle | ||
run: ./gradlew build | ||
|
||
test: | ||
name: Unit Tests | ||
runs-on: ubuntu-latest | ||
needs: lint | ||
steps: | ||
- name: Setup Environment | ||
uses: ./.github/workflows/setup-env.yml | ||
|
||
- name: Run unit tests | ||
run: ./gradlew test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters