Revision control
Copy as Markdown
name: 'Focus: reference string linter'
permissions: read-all
on:
push:
branches:
- main
paths:
- 'focus-ios/**'
- '.github/workflows/focus-ios-l10n-linter.yml'
pull_request:
branches:
- main
paths:
- 'focus-ios/**'
- '.github/workflows/focus-ios-l10n-linter.yml'
workflow_dispatch:
jobs:
check:
runs-on: xcode-27
strategy:
matrix:
xcode: ["27.1"]
python-version: ["3.12"]
steps:
- name: Clone code repository
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
with:
path: "code_repo"
- name: Clone l10n repository
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
with:
repository: "mozilla-l10n/focusios-l10n"
path: "l10n_repo"
- name: Select Xcode ${{ matrix.xcode }}
run: |
sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: ${{ matrix.python-version }}
- name: Install l10n dependencies
run: |
pip install -r l10n_repo/.github/scripts/requirements.txt
- name: Run bootstrap script
run: |
(cd code_repo && ./bootstrap.sh focus)
- name: Extract strings
run: |
(cd code_repo && ./focus-ios/focus-ios-tests/tools/export-strings.sh)
- name: Check reference locale
run: |
(cd code_repo && moz-xliff-lint --path focus-ios/focusios-l10n/en-US --config .github/l10n/linter_config_focus.json)
- name: Store reference artifact
if: always()
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
with:
name: focus-xliff-file
path: code_repo/focus-ios/focusios-l10n/en-US/*.xliff
if-no-files-found: ignore