|
| 1 | +# pluginval GitHub Actions |
| 2 | + |
| 3 | +Two composite actions for using pluginval from another repository's workflows. |
| 4 | +Both run on Linux, macOS and Windows runners, download the matching pluginval |
| 5 | +release (or use a binary you give them), run everything they are given, write a |
| 6 | +results table to the job summary and fail the step if anything failed. |
| 7 | + |
| 8 | +On Linux the plugin is run under `xvfb-run` when there is no `DISPLAY` (install |
| 9 | +`xvfb` on runners that don't have it). |
| 10 | + |
| 11 | +## validate |
| 12 | + |
| 13 | +Validates one or more plugins. |
| 14 | + |
| 15 | +```yaml |
| 16 | +- uses: Tracktion/pluginval/.github/actions/validate@v2 |
| 17 | + with: |
| 18 | + plugins: | |
| 19 | + build/MyPlugin_artefacts/Release/VST3/MyPlugin.vst3 |
| 20 | + build/MyPlugin_artefacts/Release/AU/MyPlugin.component |
| 21 | + strictness-level: 10 |
| 22 | + args: --skip-gui-tests |
| 23 | +``` |
| 24 | +
|
| 25 | +| Input | Default | | |
| 26 | +| --- | --- | --- | |
| 27 | +| `plugins` | (required) | The plugins to validate, one per line. Each is a path, a glob or an AU id. A glob that matches nothing fails. | |
| 28 | +| `strictness-level` | `5` | The strictness level (1-10). | |
| 29 | +| `args` | | Extra options for `pluginval validate`, split on whitespace. | |
| 30 | +| `pluginval-version` | `v2.0.0-beta1` | The pluginval release to download: a tag, or `latest`. | |
| 31 | +| `pluginval-path` | | An existing pluginval binary to use instead of downloading one. | |
| 32 | + |
| 33 | +Every `pluginval validate` option can also be set as an environment variable on |
| 34 | +the step (e.g. `env: { TIMEOUT_MS: 60000 }`), which is the way to pass values |
| 35 | +containing spaces. |
| 36 | + |
| 37 | +## acceptance |
| 38 | + |
| 39 | +Runs the [acceptance tests](../../docs/Acceptance%20testing.md) for every config |
| 40 | +(`*.json`) found recursively under a directory, optionally against one built |
| 41 | +plugin. |
| 42 | + |
| 43 | +```yaml |
| 44 | +- uses: Tracktion/pluginval/.github/actions/acceptance@v2 |
| 45 | + with: |
| 46 | + config-dir: tests/acceptance |
| 47 | + plugin: build/MyPlugin_artefacts/Release/VST3/MyPlugin.vst3 |
| 48 | +``` |
| 49 | + |
| 50 | +| Input | Default | | |
| 51 | +| --- | --- | --- | |
| 52 | +| `config-dir` | (required) | Directory searched recursively for configs. | |
| 53 | +| `plugin` | | Plugin path or AU id to test every config against, instead of the `plugin` in each config. | |
| 54 | +| `record-missing` | `false` | Record a missing reference and pass, instead of failing. | |
| 55 | +| `timeout-ms` | | Fail a test if it takes longer than this (pluginval's default if empty). | |
| 56 | +| `pluginval-version` | `v2.0.0-beta1` | The pluginval release to download: a tag, or `latest`. | |
| 57 | +| `pluginval-path` | | An existing pluginval binary to use instead of downloading one. | |
| 58 | + |
| 59 | +Notes: |
| 60 | + |
| 61 | +- Every `*.json` under `config-dir` is treated as a config, apart from the |
| 62 | + `<reference>.wav.json` manifests. Keep other JSON files (and plugin bundles, |
| 63 | + which contain their own) out of it. |
| 64 | +- A config holding an array of tests is reported as a failure: use one config |
| 65 | + per file. |
| 66 | +- Relative `plugin` paths resolve against the working directory; the input, |
| 67 | + state and reference paths in a config resolve against the config's directory. |
| 68 | + |
| 69 | +## Outputs |
| 70 | + |
| 71 | +Both actions set: |
| 72 | + |
| 73 | +| Output | | |
| 74 | +| --- | --- | |
| 75 | +| `passed` / `failed` | How many plugins / configs passed and failed. | |
| 76 | +| `report-dir` | A directory holding a JUnit XML report for each one. For `acceptance` it also has a `diffs` directory with the `*-diff.wav` files found under `config-dir`. | |
| 77 | + |
| 78 | +To keep the reports and diffs from a failed run: |
| 79 | + |
| 80 | +```yaml |
| 81 | +- uses: Tracktion/pluginval/.github/actions/acceptance@v2 |
| 82 | + id: acceptance |
| 83 | + with: |
| 84 | + config-dir: tests/acceptance |
| 85 | + plugin: build/MyPlugin_artefacts/Release/VST3/MyPlugin.vst3 |
| 86 | +
|
| 87 | +- uses: actions/upload-artifact@v4 |
| 88 | + if: always() |
| 89 | + with: |
| 90 | + name: pluginval-acceptance-${{ runner.os }} |
| 91 | + path: ${{ steps.acceptance.outputs.report-dir }} |
| 92 | +``` |
0 commit comments