-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #84 from wednesday-solutions/feat/add-sonar
Feat/add sonar
- Loading branch information
Showing
68 changed files
with
1,903 additions
and
111 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 |
---|---|---|
@@ -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 }} |
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 |
---|---|---|
|
@@ -61,3 +61,5 @@ buck-out/ | |
.expo/ | ||
web-build/ | ||
dist/ | ||
reports | ||
coverage |
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,21 @@ | ||
# OSX | ||
# | ||
.DS_Store | ||
|
||
# Android/IntelliJ | ||
# | ||
build/ | ||
.idea | ||
.gradle | ||
local.properties | ||
*.iml | ||
*.hprof | ||
|
||
# BUCK | ||
buck-out/ | ||
\.buckd/ | ||
*.keystore | ||
!debug.keystore | ||
|
||
# Bundle artifacts | ||
*.jsbundle |
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,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", | ||
], | ||
) |
Oops, something went wrong.
83ada69
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage report
Test suite run success
48 tests passing in 20 suites.
Report generated by 🧪jest coverage report action from 83ada69