Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,22 @@ on: # this checks should be triggered on pull request, before deployments, and m
pull_request:
paths-ignore:
- 'infra/resources/src/main/res/**'
- '**.md'
types:
# Default types of PR triggers
- opened
- reopened
- synchronize
# Ensures that Sonar check are run once PR is ready
- ready_for_review
workflow_call:
workflow_dispatch:

# Cancel in-progress runs when a new commit is pushed to the PR
concurrency:
group: pr-checks-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
core-unit-tests:
name: Core Unit Tests
Expand Down Expand Up @@ -146,3 +159,5 @@ jobs:
fingerprint-unit-tests,
testing-tools ]
uses: ./.github/workflows/reusable-sonar-scan.yml
# Only run if the PR ready for review or triggered manually
if: github.event.pull_request.draft == false || github.event_name == 'workflow_dispatch'
25 changes: 14 additions & 11 deletions .github/workflows/reusable-run-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,20 +60,23 @@ jobs:
- name: Run tests
run: |
# Get the modules array from the previous step
modules_array=("${{ steps.create-modules-array.outputs.modules_array}}")
modules_array=(${modules_array// / })
# Iterate over the array
modules_array=(${{ steps.create-modules-array.outputs.modules_array }})
# Transform input list into a single string of gradle tasks
TASKS=""
for module in "${modules_array[@]}"; do
echo -e "\n\n"
echo "=========================================="
echo "=========================================="
echo " Test $module"
echo "=========================================="
echo "=========================================="
echo -e "\n\n"
./gradlew $module:jacocoTestReport
if [ -n "$module" ]; then
TASKS="$TASKS $module:jacocoTestReport"
fi
done

echo -e "\n\n"
echo "=========================================="
echo "=========================================="
echo "Executing Gradle tasks: $TASKS"
echo "=========================================="
echo "=========================================="
echo -e "\n\n"
./gradlew $TASKS --continue --no-daemon
- name: Upload Folders
uses: actions/upload-artifact@v6
with:
Expand Down