VPN-6124: Help sheet improvements #13765
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Linters (clang, l10n) | |
on: | |
# Triggers the workflow on pull request events but only for the main branch | |
pull_request: | |
branches: | |
- main | |
- 'releases/**' | |
types: | |
- opened | |
- synchronize | |
- reopened | |
jobs: | |
linter: | |
name: Run Main Linters (clang, l10n, etc.) | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
- name: Install dependecies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y aspell aspell-en $(./scripts/linux/getdeps.py -b linux/debian/control) | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- run: pip install -r requirements.txt | |
- name: Importing translation files | |
shell: bash | |
run: | | |
python3 scripts/utils/import_languages.py | |
- name: Generate updated .ts files and check for l10n errors | |
run: | | |
./scripts/utils/generate_ts.sh | |
python .github/l10n/check_l10n_issues.py | |
- name: Check for QRC errors | |
run: | | |
python scripts/ci/check_qrc.py | |
- name: Check for addons JSON syntax | |
run: | | |
python scripts/ci/check_jsonschema.py addon.json addons/*/manifest.json | |
- name: Check for issues with clang-format | |
uses: DoozyX/clang-format-lint-action@v0.16.2 | |
with: | |
source: '.' | |
clangFormatVersion: 16 | |
style: file | |
- name: Check for issues with cargo fmt | |
run: | | |
for tomlfile in $(git ls-files -c '*/Cargo.toml'); do | |
(cd $(dirname $tomlfile) && cargo fmt --check) || true | |
done | |
- name: Spell check documentation files | |
run: | | |
scripts/utils/spellcheck.sh list | |
ktlint: | |
name: Run ktLint | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
# This allows us to use conda | |
shell: bash -el {0} | |
steps: | |
- name: Clone repo | |
uses: actions/checkout@master | |
with: | |
fetch-depth: 1 | |
- name: Cache conda Packages | |
uses: actions/cache@v2 | |
with: | |
path: ~/conda_pkgs_dir | |
key: ${{ runner.os }}-conda-${{hashFiles('env.yml')}} | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
activate-environment: vpn | |
environment-file: env.yml | |
- name: Setup Android SDK | |
run: | | |
conda info | |
./scripts/android/conda_setup_sdk.sh | |
- name: Run ktlint | |
working-directory: android | |
run: | | |
conda info | |
./gradlew ktlint | |
check-language-json: | |
name: Check if languages.json is valid | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- name: Run languagelocalizer | |
run: | | |
cd tools/languagelocalizer | |
npm install | |
node languageLocalizer.js --check |