-
Notifications
You must be signed in to change notification settings - Fork 48
69 lines (57 loc) · 2.15 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: ci
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
# The Steam Runtime platform (sniper) uses Python 3.9
python-version: "3.9"
cache: 'pip' # caching pip dependencies
- name: Install Python dependencies
run: |
pip install ijson
pip install trio
pip install "git+https://github.com/njbooher/steam.git@wsproto#egg=steam[client]"
# PyRight, the unit tests, and other scripts import/resolve the "protonfixes" module
# We are using the path "umu-protonfixes", which isn't a valid module name and can't be used
# However: this simple, hacky symbolic link in the parent folder can fix this inconvenience
- name: Fix python module resolution
run: ln -rs . ../protonfixes
# FIXME: problem matcher is currently disabled upstream, using a fork for the moment
# https://github.com/ludeeus/action-shellcheck/pull/103
# FIXME: symlinks don't work upstream
# https://github.com/ludeeus/action-shellcheck/pull/104
- name: Run ShellCheck
uses: Root-Core/action-shellcheck@fork
with:
ignore_paths: subprojects # prevent ShellCheck from checking unrelated files
ignore_symlinks: false # winetricks is symlinked
# Ruff uses ruff.toml for it's configuration
- name: Lint with Ruff
uses: astral-sh/ruff-action@v1
# Pyright uses pyproject.toml for it's configuration
- name: Static type checking with Pyright
uses: jakebailey/pyright-action@v2
- name: Validate gamefix modules
run: |
python3 .github/scripts/check_gamefixes.py
python3 .github/scripts/check_verbs.py
- name: Validate gamefix imports
run: |
python3 .github/scripts/check_imports.py
- name: Test with unittest
run: |
python3 protonfixes_test.py