Skip to content

Commit

Permalink
Merge pull request #84 from wednesday-solutions/feat/add-sonar
Browse files Browse the repository at this point in the history
Feat/add sonar
  • Loading branch information
alichherawalla authored Apr 15, 2024
2 parents 9f18cdc + 21153ad commit 83ada69
Show file tree
Hide file tree
Showing 68 changed files with 1,903 additions and 111 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,37 @@
name: react-native-template
on:
pull_request_target:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
install-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install npm dependencies
run: |
yarn
- name: Lint
run: |
npm run lint
- name: Test and generate coverage report
uses: artiomtr/jest-coverage-report-action@v2.0-rc.1
uses: artiomtr/jest-coverage-report-action@v2.2.9
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
threshold: 80
package-manager: yarn
skip-step: install
test-script: yarn test
- name: SonarQube Scan
uses: sonarsource/sonarqube-scan-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}

- uses: sonarsource/sonarqube-quality-gate-action@master
timeout-minutes: 5
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,5 @@ buck-out/
.expo/
web-build/
dist/
reports
coverage
21 changes: 21 additions & 0 deletions android/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# OSX
#
.DS_Store

# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml
*.hprof

# BUCK
buck-out/
\.buckd/
*.keystore
!debug.keystore

# Bundle artifacts
*.jsbundle
55 changes: 55 additions & 0 deletions android/app/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# To learn about Buck see [Docs](https://buckbuild.com/).
# To run your application with Buck:
# - install Buck
# - `npm start` - to start the packager
# - `cd android`
# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
# - `buck install -r android/app` - compile, install and run application
#

load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")

lib_deps = []

create_aar_targets(glob(["libs/*.aar"]))

create_jar_targets(glob(["libs/*.jar"]))

android_library(
name = "all-libs",
exported_deps = lib_deps,
)

android_library(
name = "app-code",
srcs = glob([
"src/main/java/**/*.java",
]),
deps = [
":all-libs",
":build_config",
":res",
],
)

android_build_config(
name = "build_config",
package = "com.wednesdaysolutions.rntws",
)

android_resource(
name = "res",
package = "com.wednesdaysolutions.rntws",
res = "src/main/res",
)

android_binary(
name = "app",
keystore = "//android/keystores:debug",
manifest = "src/main/AndroidManifest.xml",
package_type = "debug",
deps = [
":app-code",
],
)
Loading

1 comment on commit 83ada69

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements 93.66% 192/205
🟢 Branches 87.8% 36/41
🟢 Functions 91.03% 71/78
🟢 Lines 94.38% 168/178

Test suite run success

48 tests passing in 20 suites.

Report generated by 🧪jest coverage report action from 83ada69

Please sign in to comment.