Skip to content

Migrate to GitHub Actions reusable workflows #733

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

Merged
merged 13 commits into from
Feb 5, 2025

Conversation

timkimadobe
Copy link
Contributor

@timkimadobe timkimadobe commented Jan 30, 2025

Description

This PR migrates the Core Android repo to use the reusable workflows available in aepsdk-commons

build-and-test.yml

A migration from CircleCI to GitHub Actions

maven-release.yml

maven-snapshot.yml

update-version.yml

Questions for reviewers

  1. Does Core have an assemble-app rule? I couldn't find one in the existing CircleCI workflow, so I did not include it in the migration.
  2. Should the maven-release.yml also validate the constants files for the given extension being released too? Currently it only validates the gradle.properties value

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link

codecov bot commented Jan 31, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.01%. Comparing base (66316d1) to head (8357f6c).
Report is 3 commits behind head on dev.

❌ Your project status has failed because the head coverage (66.01%) is below the target coverage (75.00%). You can increase the head coverage or adjust the target coverage.

❗ There is a different number of reports uploaded between BASE (66316d1) and HEAD (8357f6c). Click for more details.

HEAD has 5 uploads less than BASE
Flag BASE (66316d1) HEAD (8357f6c)
unit-tests 4 0
functional-tests 1 0
Additional details and impacted files
@@              Coverage Diff              @@
##                dev     #733       +/-   ##
=============================================
- Coverage     81.59%   66.01%   -15.58%     
+ Complexity     2141     2020      -121     
=============================================
  Files           194      216       +22     
  Lines          8937    10633     +1696     
  Branches       1121     1384      +263     
=============================================
- Hits           7292     7019      -273     
- Misses         1091     3068     +1977     
+ Partials        554      546        -8     
Flag Coverage Δ
android-functional-tests 27.65% <ø> (?)
android-unit-tests 61.46% <ø> (?)
functional-tests ?
unit-tests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

see 37 files with indirect coverage changes

release-variant: ${{ github.event.inputs.extension }}
version-validation-name: ${{ github.event.inputs.extension }}
version-validation-paths: code/gradle.properties:properties_multi_module
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also add validation for version in code files so that we don't miss it during the release?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated!

Job run examples with the new validation in the PR description under maven release notes

Log snippets:

Signal release example validation:

 Validating version is 3.0.0
---- Validating versions in 'Signal.java' ----
  * File path: /home/runner/work/aepsdk-core-android/aepsdk-core-android/code/signal/src/phone/java/com/adobe/marketing/mobile/Signal.java
PASS 'EXTENSION_VERSION' with pattern `re.compile('(^[\\s\\S]*String EXTENSION_VERSION\\s*=\\s*")([0-9]+\\.[0-9]+\\.[0-9]+)')` matches '3.0.0' in 'Signal.java'

All versions are correct!

Core release example validation:

Validating version is 3.2.0
---- Validating versions in 'CoreConstants.kt' ----
  * File path: /home/runner/work/aepsdk-core-android/aepsdk-core-android/code/core/src/main/java/com/adobe/marketing/mobile/internal/CoreConstants.kt
PASS 'VERSION' with pattern `re.compile('(^[\\s\\S]*const val VERSION\\s*=\\s*")([0-9]+\\.[0-9]+\\.[0-9]+)')` matches '3.2.0' in 'CoreConstants.kt'

All versions are correct!

@timkimadobe timkimadobe requested a review from praveek February 1, 2025 01:07
@praveek
Copy link
Contributor

praveek commented Feb 3, 2025

@timkimadobe I noticed that the new workflow is missing the api-check we run. Could you add it to the build workflow?

@timkimadobe
Copy link
Contributor Author

timkimadobe commented Feb 5, 2025

@praveek Thank you for catching that! Updated to include that check in the CI workflow

See successful make api-check run from the latest commit here:

@timkimadobe timkimadobe merged commit 5762bfc into adobe:dev Feb 5, 2025
22 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants