Skip to content

Commit

Permalink
CI Cleanup (#74)
Browse files Browse the repository at this point in the history
* Prep for rename master to main
* Add static analysis to CI

Co-authored-by: sshropshire <[email protected]>
  • Loading branch information
sarahkoop and sshropshire authored Sep 29, 2023
1 parent bd2ffd9 commit 550a896
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 3 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@ jobs:
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}

# Run static analysis after successful build
static_analysis:
name: Static Analysis Browser Switch
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup Java
uses: ./.github/actions/setup_java
- name: Run Static Analysis
uses: ./.github/actions/static_analysis

# Run unit tests after a successful build
unit_test_browser_switch:
name: Unit Test Browser Switch
Expand All @@ -40,7 +52,7 @@ jobs:

# Publish after successful build and unit tests
publish_browser_switch:
needs: [ build_aar, unit_test_browser_switch ]
needs: [ build_aar, unit_test_browser_switch, static_analysis ]
name: Publish To Sonatype
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -87,7 +99,7 @@ jobs:
./ci increment_demo_app_version_code
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 ]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
# update SNAPSHOT build whenever a push or merge occurs on master
push:
branches:
- master
- main
env:
SIGNING_KEY_FILE: /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 android_lint
3 changes: 3 additions & 0 deletions ci
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ case $command_name in
publish_dokka_docs)
./gradlew dokkaHtmlMultiModule
;;
android_lint)
./gradlew lint
;;

esac

0 comments on commit 550a896

Please sign in to comment.