Skip to content

Fix #368: Add option to lock screen on play (#369) #99

Fix #368: Add option to lock screen on play (#369)

Fix #368: Add option to lock screen on play (#369) #99

Workflow file for this run

name: Lint C++ Code with clang-format
on:
pull_request:
paths:
- '**/*.cpp'
- '**/*.h'
- '**.ts'
- '**.ui'
- '.github/workflows/*.yaml'
push:
branches:
- main
jobs:
actions-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check workflow files
run: |
curl --fail -L "https://github.com/rhysd/actionlint/releases/download/v${{ env.ACTIONLINT_VERSION }}/actionlint_${{ env.ACTIONLINT_VERSION }}_linux_amd64.tar.gz" -o actionlint.tar.gz
echo "${{ env.ACTIONLINT_SHA256 }} actionlint.tar.gz" | sha256sum --check -
tar xzf actionlint.tar.gz actionlint
./actionlint -color
env:
ACTIONLINT_VERSION: 1.7.7
ACTIONLINT_SHA256: 023070a287cd8cccd71515fedc843f1985bf96c436b7effaecce67290e7e0757 # pragma: allowlist secret
clang-format-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install clang-format
run: sudo apt-get install -y clang-format
- name: Check formatting
run: |
FILES=$(find . -regex '.*\.\(cpp\|h\)')
# shellcheck disable=SC2086
clang-format --dry-run --Werror -style=file $FILES
check-translations:
runs-on: ubuntu-latest
env:
QT_VERSION: 6.9.1
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ env.QT_VERSION }}
- name: Generate .ts files with lupdate
run: |
lupdate src/ -ts locale/*.ts
- name: Check for unfinished translations
run: |
if grep -q 'type="unfinished"' locale/fr_FR.ts; then
echo "::error ::Unfinished locale found:"
grep -Hn 'type="unfinished"' locale/fr_FR.ts
exit 1
else
echo "✅ All translations are complete."
fi