mirror of
https://github.com/lutris/lutris.git
synced 2026-06-18 10:50:06 -04:00
Switches lutris.spec, debian/control, INSTALL.rst, CONTRIBUTING.md, and the static.yml CI workflow off GTK 3, WebKit2, GnomeDesktop, and libnotify (none of which the GTK 4 client uses) and onto gtk4 / webkitgtk6.0. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
118 lines
3.3 KiB
YAML
118 lines
3.3 KiB
YAML
on: [push, pull_request]
|
|
|
|
name: Static Analysis
|
|
jobs:
|
|
syntax-compat:
|
|
name: Syntax Compatibility (Python ${{ matrix.python-version }})
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
python-version: ["3.10"]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- name: Check syntax compatibility
|
|
run: python -m compileall -q lutris/
|
|
|
|
mypy-checker:
|
|
name: Mypy
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Print current dir
|
|
run: pwd
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
- name: Install Ubuntu dependencies
|
|
run: |
|
|
sudo apt update
|
|
sudo apt-get install libdbus-1-dev pkg-config libgirepository-2.0-dev python3-gi-cairo libcairo2-dev
|
|
- name: Install Python dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
make req-python
|
|
make dev
|
|
- name: Run mypy analysis
|
|
run: |
|
|
mypy --version
|
|
mypy . --python-version 3.10
|
|
|
|
po-checker:
|
|
name: Translation files
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install gettext
|
|
run: sudo apt-get install -y gettext
|
|
- name: Validate .po files
|
|
run: |
|
|
for f in po/*.po; do
|
|
msgfmt --check "$f" -o /dev/null
|
|
done
|
|
|
|
annotation-compat:
|
|
name: Annotation Compatibility
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.10"
|
|
- name: Check for unquoted TYPE_CHECKING annotations
|
|
run: python utils/check_annotations.py
|
|
|
|
ruff-checker:
|
|
name: Ruff
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
- name: Install Ubuntu dependencies
|
|
run: |
|
|
sudo apt update
|
|
sudo apt-get install libdbus-1-dev pkg-config libgirepository-2.0-dev python3-gi-cairo libcairo2-dev
|
|
- name: Install Python dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
make dev
|
|
- name: Ruff version
|
|
run: ruff --version
|
|
- name: Check code style
|
|
run: ruff check .
|
|
- name: Check format
|
|
run: ruff format . --check
|
|
|
|
unit-test:
|
|
name: UnitTest
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
- name: Install Ubuntu dependencies
|
|
run: |
|
|
sudo apt update
|
|
sudo apt-get install libdbus-1-dev pkg-config libgirepository-2.0-dev python3-gi-cairo libcairo2-dev libgtk-4-dev libgdk-pixbuf-2.0-dev libwebkitgtk-6.0-dev
|
|
- name: Install Python dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
python -m venv .venv
|
|
. .venv/bin/activate
|
|
make req-python
|
|
make dev
|
|
- name: Run Unit Test
|
|
run: |
|
|
. .venv/bin/activate
|
|
nose2 --exclude-ci
|