Skip to content
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

Develop (fork) Branch Update #5

Merged
merged 5 commits into from
Sep 16, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/build_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ jobs:
run: |
cp $GITHUB_WORKSPACE/bazel-bin/oppia.apk /home/runner/work/oppia-android/oppia-android/

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: oppia-bazel.apk
path: /home/runner/work/oppia-android/oppia-android/oppia.apk
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
# We require 'sudo' to avoid an error of the existing android sdk. See https://github.com/actions/starter-workflows/issues/58
run: sudo ./gradlew --full-stacktrace :utility:testDebugUnitTest -Dorg.gradle.java.home=$JAVA_HOME
- name: Upload Utility Test Reports
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }} # IMPORTANT: Upload reports regardless of success or failure status
with:
name: utility reports
Expand All @@ -77,7 +77,7 @@ jobs:
# We require 'sudo' to avoid an error of the existing android sdk. See https://github.com/actions/starter-workflows/issues/58
run: sudo ./gradlew --full-stacktrace :data:testDebugUnitTest -Dorg.gradle.java.home=$JAVA_HOME
- name: Upload Data Test Reports
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }} # IMPORTANT: Upload reports regardless of success or failure status
with:
name: data reports
Expand All @@ -90,7 +90,7 @@ jobs:
# We require 'sudo' to avoid an error of the existing android sdk. See https://github.com/actions/starter-workflows/issues/58
run: sudo ./gradlew --full-stacktrace :domain:testDebugUnitTest -Dorg.gradle.java.home=$JAVA_HOME
- name: Upload Domain Test Reports
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }} # IMPORTANT: Upload reports regardless of success or failure status
with:
name: domain reports
Expand All @@ -103,7 +103,7 @@ jobs:
# We require 'sudo' to avoid an error of the existing android sdk. See https://github.com/actions/starter-workflows/issues/58
run: sudo ./gradlew --full-stacktrace :testing:testDebugUnitTest -Dorg.gradle.java.home=$JAVA_HOME
- name: Upload Testing Test Reports
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }} # IMPORTANT: Upload reports regardless of success or failure status
with:
name: testing reports
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:
run: |
sudo ./gradlew --full-stacktrace :app:testDebugUnitTest --${{ matrix.shard }} -Dorg.gradle.java.home=$JAVA_HOME
- name: Upload App Test Reports
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }} # IMPORTANT: Upload reports regardless of success or failure status
with:
name: app reports ${{ matrix.shard }}
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/static_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ jobs:
CACHE_DIRECTORY: ~/.bazel_cache
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Bazel
uses: abhinavsingh/setup-bazel@v3
Expand Down Expand Up @@ -205,6 +207,15 @@ jobs:
run: |
bazel run //scripts:string_resource_validation_check -- $(pwd)

- name: Binary files check
# The expression if: ${{ !cancelled() }} runs a job or step regardless of its success or failure while responding to cancellations,
# serving as a cancellation-compliant alternative to if: ${{ always() }} in concurrent workflows.
if: ${{ !cancelled() }}
run: |
bash /home/runner/work/oppia-android/oppia-android/scripts/pre-commit.sh
echo "No binary files found in commit"
echo "BINARY FILES CHECK PASSED"

# Note that caching is intentionally not enabled for this check since licenses should always be
# verified without any potential influence from earlier builds (i.e. always from a clean build to
# ensure the results exactly match the current state of the repository).
Expand Down
60 changes: 59 additions & 1 deletion .github/workflows/stats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,63 @@ jobs:
beta $(pwd)/oppia_beta_without_changes.aab $(pwd)/oppia_beta_with_changes.aab \
ga $(pwd)/oppia_ga_without_changes.aab $(pwd)/oppia_ga_with_changes.aab

- name: Find CI workflow run for PR
id: find-workflow-run
uses: actions/github-script@v7
continue-on-error: true
with:
script: |
const { owner, repo } = context.repo;
const runsResponse = await github.rest.actions.listWorkflowRuns({
owner,
repo,
workflow_id: 'stats.yml',
});

const runs = runsResponse.data.workflow_runs;
runs.sort((a, b) => new Date(b.created_at).getTime() - new Date(a.created_at).getTime());

const run = runs[1];
if(!run) {
core.setFailed('Could not find a succesful workflow run');
return;
}
console.log(run.id);

core.setOutput('run-id', run.id);

- name: Download previous build summary
uses: actions/download-artifact@v4
with:
name: brief_build_summary_${{ matrix.prInfo.number }}
path: ./previous_build_logs
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ steps.find-workflow-run.outputs.run-id }}
continue-on-error: true # Ignore errors if the file doesn't exist (first run)

- name: Compare current build summary with the previous one
id: build-comparison
run: |
if [ -f ./develop/brief_build_summary.log ]; then
echo "Comparing current and previous build summaries..."
if diff ./develop/brief_build_summary.log ./previous_build_logs/brief_build_summary.log > /dev/null; then
echo "No changes detected; skipping comment."
echo "skip_comment=true" >> $GITHUB_ENV
else
echo "Changes detected; proceeding with the comment."
echo "skip_comment=false" >> $GITHUB_ENV
fi
else
echo "No previous summary found; proceeding with the comment."
echo "skip_comment=false" >> $GITHUB_ENV
fi

- name: Upload current build summary for future comparison
uses: actions/upload-artifact@v4
with:
name: brief_build_summary_${{ matrix.prInfo.number }}
path: ./develop/brief_build_summary.log

# Reference: https://github.com/peter-evans/create-or-update-comment#setting-the-comment-body-from-a-file.
# Also, for multi-line env values, see: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings.
- name: Extract reports for uploading & commenting
Expand All @@ -203,14 +260,15 @@ jobs:
cp "$GITHUB_WORKSPACE/develop/full_build_summary.log" "$FULL_BUILD_SUMMARY_FILE_PATH"

- name: Add build stats summary comment
if: ${{ env.skip_comment == 'false' }}
env:
PR_NUMBER: ${{ matrix.prInfo.number }}
uses: peter-evans/create-or-update-comment@v1
with:
issue-number: ${{ env.PR_NUMBER }}
body: ${{ steps.compute-comment-body.outputs.comment_body }}

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: ${{ env.FULL_BUILD_SUMMARY_FILE_NAME }}
path: ${{ env.FULL_BUILD_SUMMARY_FILE_PATH }}
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ class ReadingTextSizeFragment : InjectableFragment(), TextSizeRadioButtonListene
readingTextSizeFragmentPresenter.onTextSizeSelected(selectedTextSize)
}

private fun retrieveFragmentArguments(): ReadingTextSizeFragmentArguments {
/** Returns the [ReadingTextSizeFragmentArguments] stored in the fragment's arguments. */
fun retrieveFragmentArguments(): ReadingTextSizeFragmentArguments {
return checkNotNull(arguments) {
"Expected arguments to be passed to ReadingTextSizeFragment"
}.getProto(FRAGMENT_ARGUMENTS_KEY, ReadingTextSizeFragmentArguments.getDefaultInstance())
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-sw/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
<string name="number_error_starting_with_floating_point">Tafadhali anza jibu lako kwa nambari (k.m.,”0” katika 0.5).</string>
<string name="number_error_invalid_format">Tafadhali weka nambari halali.</string>
<string name="number_error_larger_than_fifteen_characters">Jibu linaweza kuwa na tarakimu zisizozidi 15 (0–9) au alama (. au -).</string>
<string name="ratio_error_invalid_chars" fuzzy="true">Tafadhali andika uwiano unaojumuisha tarakimu zilizotenganishwa na koloni(k.m. 1:2 au 1:2:3).</string>
<string name="ratio_error_invalid_chars" fuzzy="true">Tafadhali andika uwiano unaojumuisha tarakimu zilizotenganishwa na koloni (k.m. 1:2 au 1:2:3).</string>
<string name="ratio_error_invalid_format" fuzzy="true">Tafadhali weka uwiano sahihi (k.m. 1:2 au 1:2:3).</string>
<string name="ratio_error_invalid_colons" fuzzy="true">Jibu lako lina koloni mbili (:) karibu na kila moja.</string>
<string name="ratio_error_invalid_size" fuzzy="true">Idadi ya masharti si sawa na masharti yanayohitajika.</string>
Expand Down
Loading
Loading