Skip to content

Commit

Permalink
fix: envoroment for each lane (#470)
Browse files Browse the repository at this point in the history
  • Loading branch information
phoebus-84 authored Sep 30, 2024
1 parent fc0d8c2 commit 45e3bdd
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 10 deletions.
1 change: 1 addition & 0 deletions .github/workflows/alpha_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,6 @@ jobs:
KEYSTORE_KEY_ALIAS: ${{ secrets.BUNDLE_BETA_PLAYSTORE_ALIAS }}
KEYSTORE_KEY_PASSWORD: ${{ secrets.BUNDLE_BETA_PASSWORD }}
KEYSTORE_STORE_PASSWORD: ${{ secrets.BUNDLE_BETA_PASSWORD }}
PUBLIC_BACKEND_URL: ${{ vars.PUBLIC_BACKEND_URL }}
with:
lane: alpha
1 change: 1 addition & 0 deletions .github/workflows/firebase_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,6 @@ jobs:
FIREBASE_APP_ID: ${{ secrets.FIREBASE_APP_ID }}
PULL_REQUEST_NUMBER: ${{ github.event.number }}
PULL_REQUEST_TITLE: ${{ github.event.pull_request.title }}
PUBLIC_BACKEND_URL: ${{ vars.PUBLIC_BACKEND_URL }}
with:
lane: distribute
1 change: 1 addition & 0 deletions .github/workflows/github_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
KEYSTORE_KEY_ALIAS: ${{ secrets.KEYSTORE_KEY_ALIAS }}
KEYSTORE_KEY_PASSWORD: ${{ secrets.KEYSTORE_KEY_PASSWORD }}
KEYSTORE_STORE_PASSWORD: ${{ secrets.KEYSTORE_STORE_PASSWORD }}
PUBLIC_BACKEND_URL: ${{ vars.PUBLIC_BACKEND_URL }}
with:
lane: github
- run: mv release.apk wallet.apk
Expand Down
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,34 @@ Download the latest test release on your Android device and install the APK:

***

## 📦 Deployment and Testing Strategy

The app follows a structured deployment approach across different environments, allowing for gradual and controlled releases. Below is a breakdown of the deployment intentions and how versioning is managed across different deployment types:

| Deployment Type | Environment | Version Name | Version Code |
|------------------|-------------|--------------------------------------|-------------------------------------------|
| github-release | prod | Semantic Versioning | Semantic versioning without dot |
| beta | prod | Semantic Versioning - beta | Max version code on PlayStore + 1 |
| alpha | staging | Semantic Versioning - alpha | Max version code on PlayStore + 1 |
| firebase | staging | Semantic Versioning - PR number | PR number |

- **github-release**: Full production release, available to all users through official app stores. Follows semantic versioning without any additional labels.
- **beta**: Limited production release intended for beta testers. The version name will include a `-beta` label, and the version code is incremented from the current max version in the Play Store.
- **alpha**: Early release for staging environments, meant for alpha testers. The version name will include an `-alpha` label, and the version code will increment similarly to beta.
- **firebase**: Used for internal testing and Continuous Integration (CI) with Firebase App Distribution. The version name corresponds to the PR number, and testers receive updates directly via Firebase.

### Request for Testers

To be included as a tester for closed alpha or Firebase releases, please email us at:

📧 **[email protected]**

Once added, you will receive instructions on how to download the app and provide feedback.

**[🔝 back to top](#toc)**

***

## 🚀 Using the Application

### Create a New User
Expand Down
14 changes: 5 additions & 9 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ APK_OUTPUT_PATH = "./release.apk"
CACHE_PATH = "./.cache"
PULL_REQUEST_NUMBER = ENV["PULL_REQUEST_NUMBER"]
PULL_REQUEST_TITLE = ENV["PULL_REQUEST_TITLE"]
PUBLIC_BACKEND_URL = ENV["PUBLIC_BACKEND_URL"]


platform :android do
Expand All @@ -33,10 +34,9 @@ platform :android do
lane :github do
sh "pnpm install -g @ionic/cli"
sh "pnpm install"
sh "cp ../.env.example ../.env"
sh "ionic cap sync android"
sh "ionic cap build android --no-open"
sh "echo #{PULL_REQUEST_NUMBER}"
sh "echo #{PUBLIC_BACKEND_URL}"
package = load_json(json_path: "./package.json")
increment_version_code(
gradle_file_path: "./android/app/build.gradle",
Expand Down Expand Up @@ -71,9 +71,10 @@ platform :android do
end

lane :distribute do
sh "echo #{PULL_REQUEST_NUMBER}"
sh "echo #{PUBLIC_BACKEND_URL}"
sh "pnpm install -g @ionic/cli"
sh "pnpm install"
sh "cp ../.env.example ../.env"
sh "ionic cap sync android"
sh "ionic cap build android --no-open"
package = load_json(json_path: "./package.json")
Expand Down Expand Up @@ -117,9 +118,9 @@ platform :android do
)
end
lane :alpha do
sh "echo #{PUBLIC_BACKEND_URL}"
sh "pnpm install -g @ionic/cli"
sh "pnpm install"
sh "cp ../.env.example ../.env"
sh "ionic cap sync android"
sh "ionic cap build android --no-open"
package = load_json(json_path: "./package.json")
Expand All @@ -146,18 +147,13 @@ platform :android do
"android.injected.signing.key.alias" => "#{KEYSTORE_KEY_ALIAS}",
"android.injected.signing.key.password" => "#{KEYSTORE_KEY_PASSWORD}",
})
# aab_path = "android/app/build/outputs/bundle/release/app-release.aab"

release = upload_to_play_store(
json_key:"#{SERVICE_ACCOUNT_PATH}",
package_name:"com.didroom.wallet",
aab:"android/app/build/outputs/bundle/release/app-release.aab",
track: 'alpha',
metadata_path: "./fastlane/metadata/android",
# skip_upload_metadata: true,
# skip_upload_images: true,
# skip_upload_screenshots: true,
# skip_upload_changelogs: true,
skip_upload_apk: true,
release_status: 'draft'
)
Expand Down
2 changes: 1 addition & 1 deletion tests/register.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { randomEmail, randomString } from './utils';
test.describe('Registration Flow', () => {
test('should navigate to registration insert password page', async ({ page }) => {
await page.goto('/login?registration=true');
await page.locator('#conditions').click({ position: { x: 0, y: 10 } });
await page.fill('input[name="email"]', '[email protected]');
await page.locator('#conditions').click({ position: { x: 0, y: 10 } });
await page.getByRole('button', { name: 'Next' }).click();
await expect(page).toHaveURL('/en/login/insert-password');
});
Expand Down

0 comments on commit 45e3bdd

Please sign in to comment.