Skip to content
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

split layer modules by features #119

Merged
merged 13 commits into from
Jul 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,3 @@ updates:
schedule:
interval: daily
open-pull-requests-limit: 10
ignore:
- dependency-name: org.jetbrains.kotlin:kotlin-reflect
versions:
- "> 1.4.32, < 2"
54 changes: 28 additions & 26 deletions .github/workflows/continuous-delivery-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,16 +135,41 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-

- name: Decode Android Keystore
id: decode_keystore
uses: timheuer/base64-to-file@v1.1
with:
fileName: 'android_release.keystore'
encodedString: ${{ secrets.ANDROID_KEYSTORE }}

- name: Decode Gradle Play Publisher Credentials
id: decode_play_store_credentials
uses: timheuer/base64-to-file@v1.1
with:
fileName: 'gradle_playstore_publisher_credentials.json'
fileDir: './'
encodedString: ${{ secrets.PLAYSTORE_CREDENTIALS }}

- name: Run debug unit tests
run: |
./gradlew --console=plain testDebugUnitTest --stacktrace
./gradlew --console=plain koverMergedXmlReport --stacktrace

- name: Upload test reports
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: tests
path: app/build/reports/tests
path: build/reports

- name: Add coverage report to PR
uses: mi-kas/kover-report@v1
with:
path: ${{ github.workspace }}/build/reports/kover/result.xml
token: ${{ secrets.GITHUB_TOKEN }}
title: App Coverage
update-comment: true
min-coverage-overall: 20
min-coverage-changed-files: 50

android_tests:
name: Tests on Android (API level ${{ matrix.api-level }})
Expand Down Expand Up @@ -214,29 +239,6 @@ jobs:
name: androidTests
path: app/build/reports/androidTests

- name: Run testCoverage
run: ./gradlew --console=plain testCoverage --stacktrace

- name: Jacoco Report to PR
if: matrix.api-level == 29
id: jacoco
uses: madrapps/jacoco-report@v1.2
with:
paths: |
${{ github.workspace }}/app/build/reports/jacoco/testCoverage/testCoverage.xml,
${{ github.workspace }}/domain/build/reports/jacoco/testCoverage/testCoverage.xml,
${{ github.workspace }}/data/build/reports/jacoco/testCoverage/testCoverage.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 1
min-coverage-changed-files: 10
title: Code Coverage
debug-mode: false

- name: Get the Coverage info
run: |
echo "Total coverage ${{ steps.jacoco.outputs.coverage-overall }}"
echo "Changed Files coverage ${{ steps.jacoco.outputs.coverage-changed-files }}"

# upload an android bundle to google play store into the internal test track
deployment:
needs: [ unit_tests, android_tests ]
Expand Down
50 changes: 0 additions & 50 deletions .github/workflows/refreshVersions.yml

This file was deleted.

153 changes: 0 additions & 153 deletions .idea/codeStyles/Project.xml

This file was deleted.

95 changes: 95 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
## Contribution
The help of the community is essential for projects like this. Users have different requirements and perspectives how their instances should work.

### Getting Started

Create a Feature request with a short but understandable description what the feature should look like and how the user can use it.

### Making Changes

* Create a `/feature/<topic>` branch from where you want to base your work.
* This is usually the `development` branch.
* Only target `release` branches if you are certain your fix must be on that branch.
* Make commits of logical and atomic units.
* Check for unnecessary whitespace with `git diff --check` before committing.
* Make sure your commit messages are in the proper format. Start the first
line of the commit with the issue number in parentheses.
* run tests and code quality checks locally ```./run_tests```


## Gitflow
- *main:* contains production code
- *development:* latest changes that will be included in the next release
- *feature/:* each feature separated until it is done and merged back to development
- *release/:* signifies an upcoming release and will be merged into main
- *hotfix/:* urgent changes to be merged into release and development


## Continuous Delivery Pipeline
The whole pipeline is automated into Github workflows.

- Code checks to enforce code quality & style
- Tests to ensure a stable and release-ready codebase
- Deployment into a preview environment
- Release to production



Each user needs to authenticate itself via [OAuth 2.0](https://datatracker.ietf.org/doc/html/rfc6749) with an [Authorization Code Grant](https://www.oauth.com/oauth2-servers/server-side-apps/authorization-code/).

After adding the **Host** and **Client ID** into the app, the app will construct the request URI
and display it in a browser window so the user can enter its credentials.
```mermaid
sequenceDiagram
actor U as User
participant A as App
participant C as Core Instance
U->>A: Enter Hostname
A--)C: Validate entered host
U->>A: Enter Client ID
A--)C: Validate entered client ID

alt OAuth Authorization Code Grant flow

C->>U: Show credentials form (RFC 4.1.1)
activate U
U->>C: Send username and password
activate C
deactivate U
C->>A: Respond with auth code (RFC 4.1.2)
A->>C: Request access token (RFC 4.1.3)
C->>A: Respond with access token (RFC 4.1.4)
deactivate C
end
A->>C: Load data with access token
C->>A: Return data
A->>U: Display data to user

```

## Synchronization

The synchronisation of photos with a core instance is done in multiple steps:

```mermaid
flowchart LR
store[Android media store]
repo[(Photos repository)]
core((Core instance))

store --> syncWorker --> repo
repo --> uploadWorker --> core
core --> downloadWorker --> repo

subgraph Local Sync
syncWorker(SyncLocalPhotosWorker)
end

subgraph Upload
uploadWorker[UploadWorker]
end

subgraph Download
downloadWorker[DownloadWorker]
end
```
Loading
Loading