Skip to content

Commit

Permalink
ci: add more e2e tests (#212)
Browse files Browse the repository at this point in the history
* tests: add test for initial umu setup

* tests: add test for config file usage

* tests: add test for running winetricks verbs

* workflows: add more e2e tests

* workflows: run shellcheck on tests

* tests: shellcheck lint

* tests: fix winetricks path

* tests: silence tar extract

* workflows: run config test in 3.11

* workflows: fix python version

* tests: log python version

* tests: reference venv python

* tests: mock wineboot exe

* workflows: refactor build steps

* tests: use wineboot from previous step

* workflows: let config test use Games dir

* tests: use UMU-Proton for config test

* tests: prefer sh instead of bash
  • Loading branch information
R1kaB3rN authored Oct 9, 2024
1 parent 93b8b77 commit 459ba8e
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 7 deletions.
24 changes: 21 additions & 3 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,32 @@ jobs:
fetch-depth: 0
- name: Install dependencies
run: |
sudo apt-get install meson scdoc python3-hatchling python3-build python3-installer python3-filelock
sudo apt-get install meson scdoc python3-hatchling python3-build python3-installer python3-filelock shellcheck
python3 -m pip install --upgrade pip
pip install uv
- name: Initialize submodules
run: |
git submodule update --init --recursive
- name: Make user install
run: |
./configure.sh --user-install
make install
- name: Run tests
- name: Run shellcheck
run: |
bash tests/test_update.sh
shellcheck tests/*.sh
- name: Test steamrt install
run: |
sh tests/test_install.sh
rm -rf "$HOME/.local/share/umu" "$HOME/Games/umu" "$HOME/.local/share/Steam/compatibilitytools.d"
- name: Test steamrt update
run: |
sh tests/test_update.sh
rm -rf "$HOME/.local/share/umu" "$HOME/Games/umu" "$HOME/.local/share/Steam/compatibilitytools.d"
- name: Test winetricks
run: |
sh tests/test_winetricks.sh
rm -rf "$HOME/.local/share/umu" "$HOME/.local/share/Steam/compatibilitytools.d"
- name: Test configuration file
run: |
uv python install 3.11
uv run --python 3.11 -- sh tests/test_config.sh
21 changes: 21 additions & 0 deletions tests/test_config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env sh

python --version

tmp=$(mktemp)
mkdir -p "$HOME/.local/share/Steam/compatibilitytools.d"
mkdir -p "$HOME/Games/umu/umu-0"
curl -LJO "https://github.com/Open-Wine-Components/umu-proton/releases/download/UMU-Proton-9.0-3/UMU-Proton-9.0-3.tar.gz"
tar xaf UMU-Proton-9.0-3.tar.gz
mv UMU-Proton-9.0-3 "$HOME/.local/share/Steam/compatibilitytools.d"

echo "[umu]
proton = '~/.local/share/Steam/compatibilitytools.d/UMU-Proton-9.0-3'
game_id = 'umu-0'
prefix = '~/Games/umu/umu-0'
exe = '~/Games/umu/umu-0/drive_c/windows/syswow64/wineboot.exe'
launch_args = ['-u']
" >> "$tmp"


UMU_LOG=debug GAMEID=umu-0 "$PWD/.venv/bin/python" "$HOME/.local/bin/umu-run" --config "$tmp"
3 changes: 3 additions & 0 deletions tests/test_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env sh

UMU_LOG=debug GAMEID=umu-0 "$HOME/.local/bin/umu-run" wineboot -u
8 changes: 4 additions & 4 deletions tests/test_update.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env sh

mkdir -p $HOME/.local/share/umu
mkdir -p "$HOME/.local/share/umu"

curl -LJO "https://repo.steampowered.com/steamrt3/images/0.20240916.101795/SteamLinuxRuntime_sniper.tar.xz"
tar xaf SteamLinuxRuntime_sniper.tar.xz
mv SteamLinuxRuntime_sniper/* $HOME/.local/share/umu
mv $HOME/.local/share/umu/_v2-entry-point $HOME/.local/share/umu/umu
mv SteamLinuxRuntime_sniper/* "$HOME/.local/share/umu"
mv "$HOME/.local/share/umu/_v2-entry-point" "$HOME/.local/share/umu/umu"

UMU_LOG=debug GAMEID=umu-0 $HOME/.local/bin/umu-run wineboot -u
UMU_LOG=debug GAMEID=umu-0 "$HOME/.local/bin/umu-run" wineboot -u
3 changes: 3 additions & 0 deletions tests/test_winetricks.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env sh

UMU_LOG=debug GAMEID=umu-0 "$HOME/.local/bin/umu-run" winetricks good

0 comments on commit 459ba8e

Please sign in to comment.