Skip to content

Commit

Permalink
readme updates
Browse files Browse the repository at this point in the history
  • Loading branch information
myrrc committed Jun 5, 2024
1 parent 74df390 commit a976f97
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 13 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/wf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,17 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: xdotool
version: 1.0
with: { packages: xdotool, version: 1.0 }
- uses: actions/checkout@v4
- id: cache
uses: actions/cache@v3
with:
path: tests/reaper
key: cache
with: { path: tests/reaper, key: cache }
- if: steps.cache.outputs.cache-hit != 'true'
run: cd tests; chmod +x prepare; ./prepare
- run: |
export DISPLAY=:99
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
cd tests
chmod +x copy-configs; ./copy-configs
chmod +x test; ./test
export DISPLAY=:99; sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
cd tests; chmod +x copy-configs patch-settings test
./copy-configs
./patch-settings
./test
exit $?
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,31 @@ internal/definitions/bindings.lua -> add or customise key bindings
internal/definitions/config.lua -> change GUI settings
```

## Reporting performance issues
## Contributing
### Running tests

For running tests locally you'd need some Linux distribution with X11 and `xdotool`.

```sh
cd tests;
chmod +x prepare copy-configs patch-settings test

./prepare # This will create a local Reaper installation
./copy-configs # This will make current instance of reaper-keys testable
./patch-settings # Or change test to true in internal/definitions/config.lua
./test # This will run every test and compare with reference projects
```

If you don't use X11 you can have a look at `.github/workflows/wf.yml` to see how x11 is
emulated with Xvfb.

### Writing tests

Each test is just a sequence of keys you press to achieve some result. One notable exception is
a hotkey or a special key like "Return" (Enter) or "Backspace". In that case, prefix line with
`&` and enter the key combination after, like `&Return`.

### Reporting performance issues

1. Download "Lua profiler" from ReaTeam Scripts and "ReaImGui" from ReaTeam Extensions via
ReaPack.
Expand Down
2 changes: 1 addition & 1 deletion internal/definitions/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ local general = {
show_feedback_window = true,
search_for_custom_config = false,
profile = false,
test = true,
test = false,
-- should operators in visual modes reset the selection or have it persist?
persist_visual_timeline_selection = true,
persist_visual_track_selection = false,
Expand Down
2 changes: 2 additions & 0 deletions tests/patch-settings
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
sed -i 's/test = false/test = true/g' ../internal/definitions/config.lua

0 comments on commit a976f97

Please sign in to comment.