Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
nvllz authored Nov 17, 2023
2 parents fa161db + 0d693c9 commit 03cb9d9
Show file tree
Hide file tree
Showing 453 changed files with 13,390 additions and 5,311 deletions.
Binary file removed .DS_Store
Binary file not shown.
63 changes: 53 additions & 10 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
## Pull Request (PR) Checklist
Please check if your pull request fulfills the following requirements:
- [ ] The PR is submitted to the `main` branch.
- [ ] I've read the [Contribution Guidelines](https://github.com/Ivy-Apps/ivy-wallet/blob/main/CONTRIBUTING.md).
- [ ] I've read the [Contribution Guidelines](https://github.com/Ivy-Apps/ivy-wallet/blob/main/CONTRIBUTING.md) and my PR doesn't break the "Contributing Rules".
- [ ] I've read the [Architecture Guidelines](https://github.com/Ivy-Apps/ivy-wallet/blob/main/docs/Architecture.md).
- [ ] My code builds and is tested on a real Android device.
- [ ] I confirm that I've run the code locally and everything works as expected.
- [ ] 🎬 I've attached a **screen recoding** of the changes.

> Tip: drag & drop the video to the PR description.
## What's changed?
<!--
Tip: you can attach screenshots using a markdown table.
Screenshot 1 | Screenshot 2
Before | After
---|---
copy-paste screenshot 1 | copy-paste 2
Describe things in a short and straightforward manner.
image1 | image2
-->

Describe with a few bullets **what's new:**
Expand All @@ -23,7 +23,7 @@ Describe with a few bullets **what's new:**
- c
- d

_💡 Tip: Please, attach screenshots and screen recordings. It helps a lot!_
> 💡 Tip: Please, attach screenshots and screen recordings. It helps a lot!
## Risk Factors

Expand All @@ -33,7 +33,6 @@ _💡 Tip: Please, attach screenshots and screen recordings. It helps a lot!_
- b
- c


**In what cases your code won't work?**

- a
Expand All @@ -45,6 +44,50 @@ _💡 Tip: Please, attach screenshots and screen recordings. It helps a lot!_

Check **[Ivy Wallet Issues](https://github.com/Ivy-Apps/ivy-wallet/issues)**.

- Closes #{ISSUE_NUMBER}
- Closes #ISSUE_NUMBER

> Replace `ISSUE_NUMBER` with your issue number (for example Closes #1234). If you've done that correctly, you'll see the issue title linked when previewing your PR description.
## Troubleshooting CI failures

If you see any of the PR checks failing (❌) go to [Actions](https://github.com/Ivy-Apps/ivy-wallet/actions) and find it there. Or simply click "Details" next to the failed check and explore the logs to see why it has failed.

### Detekt
[Detekt](https://detekt.dev/) is a static code analyzer for Kotlin that we use to enforce code readibility and good practices.

**To run Detekt locally:**
```
./gradlew detekt
```

If the Detekt errors are caused by a legacy code, you can suppress them using a basline.

**Detekt baseline** (not recommended)
```
./scripts/detektBaseline.sh
```

### Lint

We use the [standard Android Lint](https://developer.android.com/studio/write/lint) plus [Slack's compose-lints](https://slackhq.github.io/compose-lints/) as an addition to enforce proper Compose usage.

**To run Lint locally:**
```
./scripts/lint.sh
```

If the Lint errors are caused by a legacy code, you can suppress them using a basline.

**Lint baseline** (not recommended)
```
./scripts/lintBaseline.sh
```

### Unit tests

If this job is failing this means that your changes break an existing unit test. You must identify the failing tests and fix your code.

_Replace `{ISSUE_NUMBER}` with the id/number of the issue that you've fixed._
**To run the Unit tests locally:**
```
./gradlew testDebugUnitTest
```
2 changes: 0 additions & 2 deletions .github/workflows/apk.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
name: APK

on:
# Triggers the workflow on push or pull request events
push:
branches:
- main

pull_request:

jobs:
Expand Down
17 changes: 2 additions & 15 deletions .github/workflows/detekt.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
name: Detekt

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events
push:
branches:
- main

pull_request:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
detekt:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout GIT
uses: actions/checkout@v4

Expand All @@ -26,10 +18,8 @@ jobs:
with:
distribution: 'adopt'
java-version: '18'
#----------------------------------------------------

#Optimization
- name: Enable Gradle Wrapper caching (optmization)
- name: Enable Gradle Wrapper caching (optimization)
uses: actions/cache@v3
with:
path: |
Expand All @@ -38,9 +28,7 @@ jobs:
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
#---------------------------------------------------
#Detekt
- name: Detekt
run: ./gradlew detekt

Expand All @@ -49,5 +37,4 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: detekt-report.html
path: build/reports/detekt/detekt.html
#------------------------------------------------------------------
path: build/reports/detekt/detekt.html
31 changes: 31 additions & 0 deletions .github/workflows/issue_assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Issue Comment Action

on:
issue_comment:
types: [ created ]

jobs:
handle-comment:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Java SDK
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '18'

- name: Enable Gradle Wrapper caching (optimization)
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Execute "Issue Assign" automation
run: ./gradlew :automations:issue-assign:run --args='issueNumber=${{ github.event.issue.number }} gitHubPAT=${{ secrets.IVYWALLET_BOT_GITHUB_PAT_2 }}'
18 changes: 2 additions & 16 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
name: Lint

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events
push:
branches:
- main

pull_request:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
lint:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout GIT
uses: actions/checkout@v4

Expand All @@ -26,10 +18,8 @@ jobs:
with:
distribution: 'adopt'
java-version: '18'
#----------------------------------------------------

#Optimization
- name: Enable Gradle Wrapper caching (optmization)
- name: Enable Gradle Wrapper caching (optimization)
uses: actions/cache@v3
with:
path: |
Expand All @@ -38,9 +28,7 @@ jobs:
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
#---------------------------------------------------
#Lint
- name: Lint (release)
run: ./gradlew lintRelease

Expand All @@ -50,13 +38,11 @@ jobs:
with:
name: lint-release-report.html
path: build/reports/lint/lint.html
#------------------------------------------------------------------

- name: Fail if lint errors are found
run: |
# Check if the lint XML report contains any error issues
if grep -q 'severity="Error"' build/reports/lint/lint.xml; then
echo "Lint errors found. Failing the build."
exit 1
fi
fi
25 changes: 0 additions & 25 deletions .github/workflows/qodana.yml

This file was deleted.

22 changes: 22 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: 'Close Stale Issues and PRs'

on:
workflow_dispatch:
schedule:
- cron: '0 8 * * *'

permissions:
contents: write
issues: write
pull-requests: write

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
with:
days-before-issue-stale: 30
days-before-issue-close: 7
days-before-pr-stale: 2
days-before-pr-close: 1
48 changes: 33 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
name: Unit tests

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events
push:
branches:
- main

pull_request:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
test:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout GIT
uses: actions/checkout@v4

Expand All @@ -26,10 +18,8 @@ jobs:
with:
distribution: 'adopt'
java-version: '18'
#----------------------------------------------------

#Optimization
- name: Enable Gradle Wrapper caching (optmization)
- name: Enable Gradle Wrapper caching (optimization)
uses: actions/cache@v3
with:
path: |
Expand All @@ -38,9 +28,37 @@ jobs:
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
#---------------------------------------------------
#Test
- name: Run unit tests
run: ./gradlew testDebug
#------------------------------------------------------------------
run: ./gradlew testDebugUnitTest

code_coverage:
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout GIT
uses: actions/checkout@v4

- name: Setup Java SDK
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '18'

- name: Enable Gradle Wrapper caching (optimization)
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Code Coverage
run: ./gradlew koverHtmlReport

- name: Upload Code Coverage Report
uses: actions/upload-artifact@v3
with:
name: code-coverage-report
path: app/build/artifacts/reports/kover/coverageResults/index.html
Loading

0 comments on commit 03cb9d9

Please sign in to comment.