-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Add Detekt Fixes #6 - Adds Detekt in the project - Configures github action on pull requests - Add pre-commit detekt git hook - Add internal guide to setup detekt plugin locally and pre-commit hook installation ## ⚙️ Release Notes *Add a bullet point list summary of the feature and possible migration guides if this is a breaking change so this section can be added to the release notes.* *Include code snippets that provide examples of the feature implemented or links to the documentation if it appends or changes the public interface.* ## 📚 Documentation *Please ensure that you properly document any additions in conformance to [Spezi Documentation Guide](https://github.com/StanfordSpezi/.github/blob/main/DOCUMENTATIONGUIDE.md).* *You can use this section to describe your solution, but we encourage contributors to document your reasoning and changes using in-line documentation.* ## ✅ Testing *Please ensure that the PR meets the testing requirements set by CodeCov and that new functionality is appropriately tested.* *This section describes important information about the tests and why some elements might not be testable.* ## 📝 Code of Conduct & Contributing Guidelines By submitting creating this pull request, you agree to follow our [Code of Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md): - [ ] I agree to follow the [Code of Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md).
- Loading branch information
Showing
104 changed files
with
1,276 additions
and
284 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,60 @@ | ||
name: Pull Request | ||
|
||
on: | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
concurrency: | ||
group: build-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
detekt: | ||
name: Detekt review | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 1 | ||
ref: ${{ github.head_ref }} | ||
- name: Detekt PR Check | ||
uses: alaegin/[email protected] | ||
with: | ||
reviewdog_reporter: github-pr-check | ||
github_token: ${{ secrets.github_token }} | ||
fail_on_error: true | ||
detekt_config: internal/detekt-config.yml | ||
|
||
buildtestanalyze: | ||
name: Build, test and analyze | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 120 | ||
permissions: # needed for CodeQL steps | ||
security-events: write | ||
packages: read | ||
actions: read | ||
contents: read | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/[email protected] | ||
- name: Initialize CodeQL # CodeQL init should happen before project build! | ||
uses: github/codeql-action/init@v3 | ||
with: | ||
languages: java-kotlin | ||
build-mode: manual | ||
- name: Set up JDK 17 | ||
uses: actions/[email protected] | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
cache: gradle | ||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v3 | ||
- name: Build and test | ||
run: ./gradlew build | ||
- name: Perform CodeQL Analysis # CodeQL analysis needs project build! | ||
uses: github/codeql-action/analyze@v3 | ||
with: | ||
category: "/language:java-kotlin" |
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: Merge | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
|
||
concurrency: | ||
group: build-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
buildtestanalyze: | ||
uses: ./.github/workflows/build-and-test.yml | ||
secrets: inherit | ||
|
||
uploadartifacts: | ||
name: Archive production artifacts | ||
runs-on: ubuntu-latest | ||
needs: buildtestanalyze | ||
steps: | ||
- name: Checkout code | ||
uses: actions/[email protected] | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: app | ||
path: app/build/outputs/apk/ | ||
|
||
dokka: | ||
runs-on: ubuntu-latest | ||
needs: buildtestanalyze | ||
steps: | ||
- name: Checkout code | ||
uses: actions/[email protected] | ||
- name: Set up JDK 17 | ||
uses: actions/[email protected] | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
cache: gradle | ||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v3 | ||
- name: Run Dokka with Gradle | ||
run: ./gradlew dokkaHtmlMultiModule | ||
- name: Deploy to GitHub Pages | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
branch: gh-pages | ||
folder: build/dokka/htmlMultiModule |
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 |
---|---|---|
|
@@ -36,4 +36,4 @@ dependencies { | |
implementation(libs.hilt.navigation.compose) | ||
|
||
implementation(project(":core:bluetooth")) | ||
} | ||
} |
22 changes: 0 additions & 22 deletions
22
app/src/androidTest/kotlin/edu/stanford/spezi/app/ExampleInstrumentedTest.kt
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
|
@@ -12,4 +12,4 @@ class MainApplication : Application() { | |
|
||
SpeziLogger.setLoggingEnabled(enabled = BuildConfig.DEBUG) | ||
} | ||
} | ||
} |
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
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
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 |
---|---|---|
|
@@ -4,4 +4,4 @@ data class DeviceUiModel( | |
val address: String, | ||
val measurementsCount: Int, | ||
val summary: String, | ||
) | ||
) |
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
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 |
---|---|---|
|
@@ -189,4 +189,4 @@ class BluetoothViewModelTest { | |
uiStateMapper = uiStateMapper | ||
) | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -87,4 +87,4 @@ class BluetoothUiStateMapperTest { | |
const val WEIGHT = 4.56 | ||
const val ADDRESS = "some device address" | ||
} | ||
} | ||
} |
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
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
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
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
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 |
---|---|---|
|
@@ -29,4 +29,4 @@ class HiltConventionPlugin : Plugin<Project> { | |
enableAggregatingTask = true | ||
} | ||
} | ||
} | ||
} |
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
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
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 |
---|---|---|
|
@@ -59,4 +59,4 @@ class SpeziBaseConfigConventionPlugin : Plugin<Project> { | |
} | ||
} | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -36,4 +36,4 @@ class SpeziComposeConventionPlugin : Plugin<Project> { | |
} | ||
} | ||
} | ||
} | ||
} |
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
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
Oops, something went wrong.