Skip to content

Commit

Permalink
Merge branch 'develop' into bug/9615-BiometricLoginRefreshTokenFix
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-guest-wilcore authored Feb 18, 2025
2 parents 75237c2 + d402707 commit 23f652a
Show file tree
Hide file tree
Showing 308 changed files with 4,996 additions and 4,297 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ body:
- type: input
id: duedate
attributes:
label: 12.) What is your ideal due date for this change request?
label: 12.) Is there a hard deadline associated with this request?
description:
placeholder: MM/DD/YYYY or Quarter
placeholder: MM/DD/YYYY
validations:
required: true

2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/release_ticket.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release Review Template
about: Template for requesting a production release for VA mobile app
title: "{{ env.releaseDate }} Release Sign-Off: {{ env.versionNumber }}"
labels: release
assignees: timwright12, chrisj-usds, dumathane, rachelhanster, SarahHuber_AdHoc, DonMcCaugheyUSDS, TKDickson
assignees: DonMcCaugheyUSDS

---

Expand Down
68 changes: 68 additions & 0 deletions .github/workflows/app_store_checks_apple.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# workflow to check that PR does not break any Apple App Store max file or max character limits
name: "App Store requirement checks"

on:
pull_request:
branches:
- main
- develop
- 'release/v**'
paths:
- "VAMobile/ios/fastlane/metadata/en-US/**"
- "VAMobile/ios/fastlane/screenshots/**"

jobs:
check_ios_ipad_pro2_images:
uses: ./.github/workflows/check_max_size.yml
with:
max_size: 10
working_dir: VAMobile/ios/fastlane/screenshots/en-US
counting_function: find . -maxdepth 1 -name "ipadPro2*" -printf '.' | wc -m
check_ios_ipad_pro13_images:
uses: ./.github/workflows/check_max_size.yml
with:
max_size: 10
working_dir: VAMobile/ios/fastlane/screenshots/en-US
counting_function: find . -maxdepth 1 -name "ipadPro13*" -printf '.' | wc -m
check_ios_ipad_pro129_images:
uses: ./.github/workflows/check_max_size.yml
with:
max_size: 10
working_dir: VAMobile/ios/fastlane/screenshots/en-US
counting_function: find . -maxdepth 1 -name "ipadPro12*" -printf '.' | wc -m
check_ios_iphone55_images:
uses: ./.github/workflows/check_max_size.yml
with:
max_size: 10
working_dir: VAMobile/ios/fastlane/screenshots/en-US
counting_function: find . -maxdepth 1 -name "phone5*" -printf '.' | wc -m
check_ios_iphone67_images:
uses: ./.github/workflows/check_max_size.yml
with:
max_size: 10
working_dir: VAMobile/ios/fastlane/screenshots/en-US
counting_function: find . -maxdepth 1 -name "iphone6*" -printf '.' | wc -m
check_ios_description:
uses: ./.github/workflows/check_max_size.yml
with:
max_size: 4000
working_dir: VAMobile/ios/fastlane/metadata/en-US
counting_function: wc -c description.txt | awk '{print $1}'
check_ios_release_notes:
uses: ./.github/workflows/check_max_size.yml
with:
max_size: 4000
working_dir: VAMobile/ios/fastlane/metadata/en-US
counting_function: wc -c release_notes.txt | awk '{print $1}'
check_ios_keyword:
uses: ./.github/workflows/check_max_size.yml
with:
max_size: 1000
working_dir: VAMobile/ios/fastlane/metadata/en-US
counting_function: wc -c keywords.txt | awk '{print $1}'
check_ios_title:
uses: ./.github/workflows/check_max_size.yml
with:
max_size: 50
working_dir: VAMobile/ios/fastlane/metadata/en-US
counting_function: wc -c title.txt | awk '{print $1}'
49 changes: 49 additions & 0 deletions .github/workflows/app_store_checks_google.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# workflow to check that PR does not break any Googke Play Store max file or max character limits
name: "App Store requirement checks"

on:
pull_request:
branches:
- main
- develop
- 'release/v**'
paths:
- "VAMobile/android/fastlane/metadata/android/en-US/**"

jobs:
check_max_android_phone_screenshots:
uses: ./.github/workflows/check_max_size.yml
with:
max_size: 8
working_dir: VAMobile/android/fastlane/metadata/android/en-US/images/phoneScreenshots
counting_function: ls | wc -l
check_max_android_seven_inch_screenshots:
uses: ./.github/workflows/check_max_size.yml
with:
max_size: 8
working_dir: VAMobile/android/fastlane/metadata/android/en-US/images/sevenInchScreenshots
counting_function: ls | wc -l
check_android_long_description:
uses: ./.github/workflows/check_max_size.yml
with:
max_size: 4000
working_dir: VAMobile/android/fastlane/metadata/android/en-US
counting_function: wc -c full-description.txt | awk '{print $1}'
check_android_short_description:
uses: ./.github/workflows/check_max_size.yml
with:
max_size: 80
working_dir: VAMobile/android/fastlane/metadata/android/en-US
counting_function: wc -c short-description.txt | awk '{print $1}'
check_android_change_log:
uses: ./.github/workflows/check_max_size.yml
with:
max_size: 500
working_dir: VAMobile/android/fastlane/metadata/android/en-US/changelogs
counting_function: wc -c default.txt | awk '{print $1}'
check_android_release_name:
uses: ./.github/workflows/check_max_size.yml
with:
max_size: 50
working_dir: VAMobile/android/fastlane/metadata/android/en-US
counting_function: wc -c title.txt | awk '{print $1}'
25 changes: 25 additions & 0 deletions .github/workflows/check_max_size.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
on:
workflow_call:
inputs:
working_dir:
required: true
type: string
max_size:
required: true
type: string
counting_function:
required: true
type: string

jobs:
check_max_files:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: |
if [[ $(${{ inputs.counting_function }}) -gt ${{ inputs.max_size }} ]]
then
echo "PR exceeds app store limits of ${{ inputs.max_size }} for this check"
exit 1
fi
working-directory: ${{ inputs.working_dir }}
28 changes: 28 additions & 0 deletions .github/workflows/code_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,31 @@ jobs:
# jest with the specified files. The number at the end is the # of chunks we're splitting the tests into.
# This should match the numbers of items in the matrix chunk array above
run: bash ${GITHUB_WORKSPACE}/.github/scripts/setupTestMatrix.sh ${{ matrix.chunk }} 5
bundle_android:
runs-on: ubuntu-4-cores-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: 'VAMobile/.nvmrc'
- name: Install dependencies
uses: nick-fields/retry@v2
with:
timeout_minutes: 10
max_attempts: 3
command: cd VAMobile && yarn install --frozen-lockfile --non-interactive
- run: yarn bundle:android
bundle_ios:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: 'VAMobile/.nvmrc'
- name: Install dependencies
uses: nick-fields/retry@v2
with:
timeout_minutes: 10
max_attempts: 3
command: cd VAMobile && yarn install --frozen-lockfile --non-interactive
- run: yarn pods && yarn bundle:ios
102 changes: 48 additions & 54 deletions .github/workflows/documentation_accessibility_checks.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
name: '[Documentation] Accessibility Check'

# Adapted from https://docusaurus.io/docs/deployment

on:
workflow_dispatch:
# Run on Weekdays at 9:00 AM UTC, 4AM ET, 1:00 AM PT
Expand All @@ -10,77 +8,73 @@ on:

jobs:
axe-scan:
name: Acessibility Check
name: Accessibility Check
runs-on: ubuntu-latest
outputs:
pages_with_errors: ${{ steps.accessibility_check.outputs.pages_with_errors }}
total_errors: ${{ steps.accessibility_check.outputs.total_errors }}
steps:
- uses: actions/checkout@v3
- name: Clean npm cache
run: npm cache clean --force
- uses: actions/checkout@v4
- name: Install Axe CLI globally
run: npm install -g @axe-core/cli@latest
- name: Update npm
run: npm install -g npm@latest
- uses: actions/setup-node@v3
run: |
npm install @axe-core/cli -g
- uses: actions/setup-node@v4
with:
node-version-file: 'VAMobile/.nvmrc'
cache: yarn
cache-dependency-path: VAMobile/yarn.lock
- name: Install latest version of chromeDriver
run: npm install -g chromedriver@latest
- name: Test build
cache-dependency-path: VAMobile/documentation/yarn.lock
- name: Install ChromeDriver
run: npm install -g chromedriver
- name: Install mobile app modules
working-directory: VAMobile
run: |
yarn install --frozen-lockfile
cd documentation
yarn install --frozen-lockfile
yarn build
- name: Start web server
working-directory: VAMobile/documentation
run: npm start & npx wait-on http://localhost:3000 &
run: |
yarn install --frozen-lockfile
yarn build
yarn start &
npx wait-on http://localhost:3000 &
sleep 10
- name: Check accessibility issues
id: accessibility_check
run: |
# Path to the downloaded sitemap file
sitemap_path="VAMobile/documentation/build/sitemap.xml"
# Counter for the number of accessibility issues detected
num_issues=0

# Extract URLs from sitemap and iterate
for url in $(grep -o '<loc>[^<]*' "$sitemap_path" | sed 's/<loc>//'); do
if axe "$url" --chromedriver-path $(npm root -g)/chromedriver/bin/chromedriver --exit; then
echo "No accessibility issues found in $url"
else
echo "Accessibility issues found in $url"
echo "$url" >> accessibility_issues.txt
num_issues=$((num_issues+1))
# Counter for urls with errors
pages_with_errors=0
# Counter for total errors
total_errors=0
for url in $(grep -o '<loc>[^<]*' "$sitemap_path" | sed 's/<loc>//');
do
# save output so that we can send it to std out AND do an operation on it
output=$(axe "$url")
# send output to stdout
echo "${output}"
# regex number of issues NOTE: grep exits 1 if it finds no match. GH Actions exits the runner if anything exits 1 so we add the || true to overcome that
issues=$(echo "${output}" | grep -oP '\d+(?= Accessibility issues detected)' || true)
# If issues is not an empty string, there were issues
if [[ ! -z "$issues" ]]
then
pages_with_errors=$((pages_with_errors + 1))
total_errors=$((total_errors + issues))
fi
done
num_issues_issues=$(grep -c 'Accessibility issues found' accessibility_issues.txt)
echo "Accessibility issues detected: $num_issues"

# Fail the workflow if accessibility issues are detected
if [ "$num_issues" -gt 0 ]; then
echo "Accessibility issues were detected."
exit 1
else
echo "No accessibility issues were found."
fi
# Output to runner
echo "pages_with_errors=$pages_with_errors" >> $GITHUB_OUTPUT
echo "total_errors=$total_errors" >> $GITHUB_OUTPUT
start_slack_thread:
name: Start Slack thread
runs-on: ubuntu-latest
if: ${{ failure() }}
needs: axe-scan
steps:
- name: Notify Slack
env:
SLACK_API_TOKEN: ${{ secrets.SLACK_API_TOKEN }}
channel_name: va-mobile-build-alerts
message: 'Accessibility issues detected. Please review and fix. Build started by ${{ github.actor }}: (:git: `${{ github.ref_name }}`). See :thread: or <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|workflow run> for results.'
run: |
curl -X POST \
-H "Authorization: Bearer $SLACK_API_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"channel\":\"$channel_name\",\"text\":\"$message\"}" \
https://slack.com/api/chat.postMessage
uses: ./.github/workflows/start_slack_thread.yml
secrets: inherit
with:
channel_name: va-mobile-build-alerts
message: 'Accessibility issues detected in the documentation site. Please review and fix. See :thread: or <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|workflow run> for results. Number of pages with errors: ${{ needs.axe-scan.outputs.pages_with_errors }}. Total number of accessibility issues detected: ${{ needs.axe-scan.outputs.total_errors }}'
Loading

0 comments on commit 23f652a

Please sign in to comment.