-
Notifications
You must be signed in to change notification settings - Fork 5
unitTesting-asu2025F #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
procrastinator007
wants to merge
81
commits into
main
Choose a base branch
from
unitTesting-asu2025F
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
81 commits
Select commit
Hold shift + click to select a range
3aa1690
Add Actions linting
polygeist111 5f96903
Implement pre-commit formatting with Prettier
polygeist111 428e122
Add Prettier, Super-Linter badges
polygeist111 e5fa935
Reformat badges
polygeist111 3737c03
Correct badges
polygeist111 5124610
Test pre-commit Prettier action
polygeist111 e16f9ae
Debug Prettier pre-commit (#1)
polygeist111 a45ebec
Debug Prettier pre-commit (#2)
polygeist111 ef08187
Debug Prettier pre-commit (#3)
polygeist111 bcba2cd
Test Prettier pre-commit (#4)
polygeist111 8b09517
Debug Prettier pre-commit (#5)
polygeist111 7cdabd9
Debug Prettier pre-commit (#6)
polygeist111 38db27c
Debug Prettier pre-commit (#7)
polygeist111 3011ce0
Debug Prettier pre-commit (#8)
polygeist111 909d253
Debug Prettier pre-commit (#9)
polygeist111 a49d744
Test Prettier pre-commit (#10)
polygeist111 537913e
Finish Prettier Config
polygeist111 6df090b
Format all XML and README files
polygeist111 5611477
Slight fix + test commit
polygeist111 d865162
Add commit message input to workflow_dispatch
polygeist111 e376ff8
Remove prettier XML plugin
polygeist111 4c790a2
First attempt at coverage report
polygeist111 b68612d
First APK build workflow
polygeist111 0460d94
Config changes for usable build
polygeist111 3249be4
PLEASE REVIEW: Minor changes to address lint build failures
polygeist111 e4ab6fa
Attempt to understand action failure
polygeist111 92de44a
(Hopefully) fix coverage reporting
polygeist111 6548407
Attempt to understand actions failure #2
polygeist111 541edd3
Attempt to understand actions failure #3
polygeist111 c2ee7b2
Attempt to understand actions failure #4
polygeist111 dfc6b99
Update Action names and add build comment for APKs
polygeist111 ac4829d
Improve Actions Summaries
polygeist111 ff87ded
Improve Actions Summaries
polygeist111 cd6ce5f
Add job concurrency and debug coverage workflow
polygeist111 2ce6e4e
Improve Action Summaries
polygeist111 d1f91ba
Created Unit testing file specifically to test WifiConnection.kt
procrastinator007 e624eff
Created Unit testing file specifically to test WifiConnection.kt
procrastinator007 67360c0
Created Unit testing file specifically to test WifiConnection.kt
procrastinator007 c28cc89
Remove redundant read override and add tests for InputStreamCounter
taimuradam 597de63
Add ListExtensionTest and rename InputStreamCounterTest methods
taimuradam d6ad974
Add unit tests for ConversationUtils
taimuradam d3250d3
Add detailed comments to test classes
taimuradam 922c607
Correct artifact expiration period
polygeist111 31f7046
Created Unit more testing files for multiple files
procrastinator007 b8aad94
Added 4 new test files
taimuradam d716450
Merge branch 'main' into unitTesting-asu2025F
polygeist111 d3ae065
Created InputStreamCounter.puml
taimuradam 9befe75
Created ListExtension.puml
taimuradam 8817def
Created ConversationUtils.puml
taimuradam fcfaf28
Created FileEncoder.puml
taimuradam d4c7f6c
Created Logger.puml
taimuradam ec12fe0
Created MessageMigrationUtils.puml
taimuradam da7317e
Created MessageUtils.puml
taimuradam b67861d
Created Unit more testing files for multiple files
procrastinator007 5fe521b
Created Unit more testing files for multiple files
procrastinator007 57a4cdf
Created Unit more testing files for multiple files
procrastinator007 a1d3c17
Created Unit more testing files for multiple files
procrastinator007 3be481d
Created Unit more testing files for multiple files
procrastinator007 b103b1d
Tested DeviceStatusManager, ConversationRepository, MessageRepository
taimuradam 18a89ef
Created UserRepository, SendScreenVM, SettingsScreenVM
taimuradam 7026b2c
Add UML images for viewmodels and repository
taimuradam 4ab5222
Add tests for ContentResolver and ViewModel
taimuradam 2fa97bc
final files of ViewModel Component
procrastinator007 ef3fde4
final files of ViewModel Component
procrastinator007 83ff9cf
final files of ViewModel Component
procrastinator007 70731a0
Organised images and Puml Files according to components
procrastinator007 1099fd2
Organised images and Puml Files according to components
procrastinator007 1091cfd
Created tests for messaging/data
taimuradam d6a6347
Add messaging UML images and relocate diagrams
taimuradam 7d94de2
Add MessageNetworkHandler tests and UML diagrams
taimuradam 58bc3ab
Organised images and Puml Files according to components
procrastinator007 3cd62ba
Merge remote-tracking branch 'origin/unitTesting-asu2025F' into unitT…
procrastinator007 742272e
Organised images and Puml Files according to components
procrastinator007 7ddd663
Add MessageService tests and UML diagrams
taimuradam 99c5068
Add UserDao tests and UML diagram
taimuradam 1d5f904
Add UserEntity tests and UML diagrams
taimuradam e7c1da2
Add NotificationHelper tests and UML
taimuradam b006a14
Merge branch 'unitTesting-asu2025F' of https://github.com/grey-box/Pr…
taimuradam f623db0
Add unit tests and UML diagrams
taimuradam df9e5ca
final few test files added
procrastinator007 7433ed1
final touchups before pull
procrastinator007 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,103 @@ | ||
| # This workflow uses actions that are not certified by GitHub. | ||
| # They are provided by a third-party and are governed by | ||
| # separate terms of service, privacy policy, and support | ||
| # documentation. | ||
| # This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time | ||
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle | ||
|
|
||
| name: Build APKs | ||
| run-name: ${{ github.event.inputs.custom_run_name || github.workflow }} | ||
|
|
||
| on: | ||
| # run anytime a PR is merged to main or a direct push to main | ||
| push: | ||
| branches: [main] | ||
|
|
||
| # run on any push to a PR branch | ||
| pull_request: | ||
|
|
||
| # run on demand | ||
| workflow_dispatch: | ||
| inputs: | ||
| custom-run-name: | ||
| description: "Custom name for this Actions run" | ||
| required: false | ||
| type: string | ||
|
|
||
| # cancel any previously-started, yet still active runs of this workflow on the same branch | ||
| concurrency: | ||
| group: ${{ github.ref }}-${{ github.workflow }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
|
|
||
| steps: | ||
| - name: Notify User to Scroll | ||
| run: | | ||
| echo "## Scroll to the end of the page for artifacts :arrow_down:" >> $GITHUB_STEP_SUMMARY | ||
| echo "" >> $GITHUB_STEP_SUMMARY | ||
| echo "---" >> $GITHUB_STEP_SUMMARY | ||
| echo "" >> $GITHUB_STEP_SUMMARY | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up JDK 21 | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| java-version: "21" | ||
| distribution: "temurin" | ||
|
|
||
| # Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies. | ||
| # See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md | ||
| - name: Setup Gradle | ||
| uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 | ||
|
|
||
| - name: Change wrapper permissions | ||
| run: chmod +x ./gradlew | ||
|
|
||
| - name: Build with Gradle Wrapper | ||
| run: ./gradlew build | ||
|
|
||
| - name: Upload App Debug APK | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: app-debug-apk # Optional: Name your artifact | ||
| path: app/build/outputs/apk/debug/app-debug.apk # Path to your build output (e.g., JARs, WARs) | ||
| retention-days: 1 # Optional: Set a custom retention period in days | ||
|
|
||
| - name: Upload App Release APK | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: app-release-apk # Optional: Name your artifact | ||
| path: app/build/outputs/apk/release/app-release-unsigned.apk # Path to your build output (e.g., JARs, WARs) | ||
| retention-days: 1 # Optional: Set a custom retention period in days | ||
| # NOTE: The Gradle Wrapper is the default and recommended way to run Gradle (https://docs.gradle.org/current/userguide/gradle_wrapper.html). | ||
| # If your project does not have the Gradle Wrapper configured, you can use the following configuration to run Gradle with a specified version. | ||
| # | ||
| # - name: Setup Gradle | ||
| # uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 | ||
| # with: | ||
| # gradle-version: '8.9' | ||
| # | ||
| # - name: Build with Gradle 8.9 | ||
| # run: gradle build | ||
|
|
||
| dependency-submission: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up JDK 21 | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| java-version: "21" | ||
| distribution: "temurin" | ||
|
|
||
| # Generates and submits a dependency graph, enabling Dependabot Alerts for all project dependencies. | ||
| # See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md | ||
| - name: Generate and submit dependency graph | ||
| uses: gradle/actions/dependency-submission@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 |
This file contains hidden or 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,56 @@ | ||
| --- | ||
| # template source: https://github.com/bretfisher/super-linter-workflow/blob/main/templates/call-super-linter.yaml | ||
| name: Lint Code Base | ||
| run-name: ${{ github.event.inputs.custom_run_name || github.workflow }} | ||
|
|
||
| on: | ||
| # run anytime a PR is merged to main or a direct push to main | ||
| push: | ||
| branches: [main] | ||
|
|
||
| # run on any push to a PR branch | ||
| pull_request: | ||
|
|
||
| # run on demand | ||
| workflow_dispatch: | ||
| inputs: | ||
| custom-run-name: | ||
| description: "Custom name for this Actions run" | ||
| required: false | ||
| type: string | ||
|
|
||
| # cancel any previously-started, yet still active runs of this workflow on the same branch | ||
| concurrency: | ||
| group: ${{ github.ref }}-${{ github.workflow }} | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: read-all | ||
|
|
||
| # adapted from https://mskelton.medium.com/auto-formatting-code-using-prettier-and-github-actions-ed458f58b7df | ||
| jobs: | ||
| call-super-linter: | ||
| # needs: format | ||
| name: Call Super-Linter | ||
|
|
||
| permissions: | ||
| contents: read # clone the repo to lint | ||
| statuses: write # read/write to repo custom statuses | ||
|
|
||
| ### use Reusable Workflows to call my workflow remotely | ||
| ### https://docs.github.com/en/actions/learn-github-actions/reusing-workflows | ||
| ### you can also call workflows from inside the same repo via file path | ||
|
|
||
| # FIXME: customize uri to point to your own reusable linter repository | ||
| uses: polygeist111/super-linter-workflow/.github/workflows/reusable-super-linter.yaml@main | ||
| # TODO: update url to point to gb reusable linter, not thalia's | ||
|
|
||
| ### Optional settings examples | ||
|
|
||
| # with: | ||
| ### For a DevOps-focused repository. Prevents some code-language linters from running | ||
| ### defaults to false | ||
| # devops-only: false | ||
|
|
||
| ### A regex to exclude files from linting | ||
| ### defaults to empty | ||
| # filter-regex-exclude: |
This file contains hidden or 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,67 @@ | ||
| name: Measure Test Coverage | ||
| run-name: ${{ github.event.inputs.custom_run_name || github.workflow }} | ||
|
|
||
| on: | ||
| # run anytime a PR is merged to main or a direct push to main | ||
| push: | ||
| branches: [main] | ||
|
|
||
| # run on any push to a PR branch | ||
| pull_request: | ||
|
|
||
| # run on demand | ||
| workflow_dispatch: | ||
| inputs: | ||
| custom-run-name: | ||
| description: "Custom name for this Actions run" | ||
| required: false | ||
| type: string | ||
|
|
||
| # cancel any previously-started, yet still active runs of this workflow on the same branch | ||
| concurrency: | ||
| group: ${{ github.ref }}-${{ github.workflow }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
| steps: | ||
| - name: Define Coverage Minimums | ||
| run: | | ||
| echo "min-coverage-overall=80" >> $GITHUB_ENV | ||
| echo "min-coverage-changed-files=80" >> $GITHUB_ENV | ||
| - uses: actions/checkout@v3 | ||
| - name: Set up JDK | ||
| uses: actions/setup-java@v3 | ||
| with: | ||
| distribution: "temurin" | ||
| java-version: "21" | ||
| - name: Set up Gradle | ||
| uses: gradle/actions/setup-gradle@v3 | ||
| - name: Generate kover coverage report | ||
| run: ./gradlew koverXmlReport | ||
| - name: Add coverage report to PR | ||
| id: kover | ||
| uses: mi-kas/kover-report@v1 | ||
| with: | ||
| path: | | ||
| ${{ github.workspace }}/app/build/reports/kover/report.xml | ||
| title: Code Coverage | ||
| update-comment: true | ||
| min-coverage-overall: ${{ env.min-coverage-overall }} | ||
| min-coverage-changed-files: ${{ env.min-coverage-changed-files }} | ||
| coverage-counter-type: LINE | ||
| - name: Add short summary to workflow run | ||
| run: | | ||
| echo "| Type | Coverage | Passing |" >> $GITHUB_STEP_SUMMARY | ||
| echo "|---|---|---|" >> $GITHUB_STEP_SUMMARY | ||
| echo "| Overall Coverage | ${{ steps.kover.outputs.coverage-overall }}% | ${{ steps.kover.outputs.coverage-overall >= env.min-coverage-overall && ':white_check_mark:' || ':x:' }} |" >> $GITHUB_STEP_SUMMARY | ||
| echo "| Changed File Coverage | ${{ steps.kover.outputs.coverage-changed-files }}% | ${{ steps.kover.outputs.coverage-changed-files >= env.min-coverage-changed-files && ':white_check_mark:' || ':x:' }} |" >> $GITHUB_STEP_SUMMARY | ||
| echo "" >> $GITHUB_STEP_SUMMARY | ||
| echo "(Changed File Coverage is currently bugged, disregard)" >> $GITHUB_STEP_SUMMARY | ||
| echo "" >> $GITHUB_STEP_SUMMARY | ||
| echo "---" >> $GITHUB_STEP_SUMMARY | ||
| echo "" >> $GITHUB_STEP_SUMMARY |
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -62,3 +62,5 @@ kotlin-ide/ | |
| .idea/ | ||
| .aider* | ||
| .env | ||
| .idea/misc.xml | ||
| .vscode/ | ||
This file contains hidden or 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 @@ | ||
| npm run lint-staged |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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,3 @@ | ||
| build | ||
| coverage | ||
| node_modules |
This file contains hidden or 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,5 @@ | ||
| The CI pipeline behaves as follows: | ||
|
|
||
| 1. run Prettier on web-related filetypes, as well as XML | ||
| a. Do not use prettier-plugin-kotlin, it is not maintained and errors regularly | ||
| 2. On push, run super-linter. For all possible cases, run autofix (this covers Kotlin) |
This file contains hidden or 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 hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
These test dependencies are duplicates of those already declared around line 94. To improve maintainability and avoid potential version conflicts, please remove this redundant block.