Skip to content

Commit

Permalink
CI Updates (#445)
Browse files Browse the repository at this point in the history
* Prep for rename master to main
* Update release workflow with lint
  • Loading branch information
sarahkoop committed Oct 2, 2023
1 parent 6e78d4a commit bc3306f
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 188 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,19 @@ jobs:
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
SIGNING_KEY_FILE: ${{ env.SIGNING_KEY_FILE_PATH }}
static_analysis:
name: Static Analysis
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Java 11
uses: actions/setup-java@v2
with:
java-version: '11.0.10'
distribution: 'zulu'
- name: Run Static Analysis
uses: ./.github/actions/static_analysis
unit_test:
name: Unit Tests
runs-on: ubuntu-latest
Expand All @@ -43,7 +56,7 @@ jobs:
java-version: '11.0.10'
distribution: 'zulu'
- name: Unit Tests
run: ./gradlew --stacktrace testRelease
run: ./ci unit_tests
publish:
needs: [ unit_test, build_aar ]
name: Publish Drop-in
Expand Down Expand Up @@ -104,7 +117,7 @@ jobs:
./gradlew -PversionParam=${{ github.event.inputs.version }} incrementSNAPSHOTVersion
./gradlew incrementVersionCode
git commit -am 'Prepare for development'
git push origin master ${{ github.event.inputs.version }}
git push origin main ${{ github.event.inputs.version }}
create_github_release:
needs: [ bump_version ]
name: Create GitHub Release
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release_snapshot.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Release SNAPSHOT
on:
# update SNAPSHOT build whenever a push or merge occurs on master
# update SNAPSHOT build whenever a push or merge occurs on main
push:
branches:
- 'master'
- 'main'
env:
SIGNING_KEY_FILE_PATH: /home/runner/secretKey.gpg
jobs:
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/static_analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Static Analysis
on: [pull_request, workflow_dispatch]
concurrency:
group: static-analysis-${{ github.event.number }}
cancel-in-progress: true
jobs:
android_lint:
name: Android Lint
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Java 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'microsoft'
- name: Lint
run: ./ci lint
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ override fun onDropInFailure(error: Exception) {

### Localization

Drop-In is currently localized for [25 languages](https://github.com/braintree/braintree-android-drop-in/tree/master/Drop-In/src/main/res). To view localized text for a specific locale, open its corresponding `values-<LOCALE_NAME>/strings.xml` resource file.
Drop-In is currently localized for [25 languages](https://github.com/braintree/braintree-android-drop-in/tree/main/Drop-In/src/main/res). To view localized text for a specific locale, open its corresponding `values-<LOCALE_NAME>/strings.xml` resource file.

### 3D Secure + Drop-in

Expand Down
181 changes: 0 additions & 181 deletions Rakefile

This file was deleted.

16 changes: 16 additions & 0 deletions ci
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash

command_name="$1"

case $command_name in
lint)
./gradlew clean lint
;;
unit_tests)
./gradlew --continue clean testRelease
;;
integration_tests)
./gradlew --continue connectedAndroidTest
;;
esac

4 changes: 2 additions & 2 deletions v6_MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ val request = DropInRequest()
request.maskCardNumber = true
```

See the [Braintree Android v4 Migration Guide](https://github.com/braintree/braintree_android/blob/master/v4_MIGRATION_GUIDE.md) for changes to request objects for Google Pay, Venmo, PayPal, and 3DS.
See the [Braintree Android v4 Migration Guide](https://github.com/braintree/braintree_android/blob/main/v4_MIGRATION_GUIDE.md) for changes to request objects for Google Pay, Venmo, PayPal, and 3DS.

## DropInRequest

Expand Down Expand Up @@ -152,7 +152,7 @@ val dropInClient = DropInClient(<ACTIVITY_OR_FRAGMENT>, "TOKENIZATION_KEY_OR_CLI

### Option 2: DropInClient with ClientTokenProvider

See [example ClientTokenProvider implementation](https://github.com/braintree/braintree_android/blob/master/v4.9.0+_MIGRATION_GUIDE.md#client-token-provider)
See [example ClientTokenProvider implementation](https://github.com/braintree/braintree_android/blob/main/v4.9.0+_MIGRATION_GUIDE.md#client-token-provider)

```java
// Java
Expand Down

0 comments on commit bc3306f

Please sign in to comment.