https://github.com/czyzby/wesnoth-wml-scope
A GitHub Action that verifies Wesnoth resources
https://github.com/czyzby/wesnoth-wml-scope
github-action github-actions github-actions-docker linter wesnoth wesnoth-umc
Last synced: 6 days ago
JSON representation
A GitHub Action that verifies Wesnoth resources
- Host: GitHub
- URL: https://github.com/czyzby/wesnoth-wml-scope
- Owner: czyzby
- Created: 2022-07-19T14:27:04.000Z (almost 3 years ago)
- Default Branch: latest
- Last Pushed: 2024-06-16T12:19:04.000Z (about 1 year ago)
- Last Synced: 2025-05-05T20:19:54.756Z (about 2 months ago)
- Topics: github-action, github-actions, github-actions-docker, linter, wesnoth, wesnoth-umc
- Language: Shell
- Homepage:
- Size: 7.81 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WML Scope Checker
A GitHub Action for [Wesnoth](https://www.wesnoth.org/) add-ons.
Verifies project resources using the `wmlscope` tool from a partially
cloned [Wesnoth repository](https://github.com/wesnoth/wesnoth).## Usage
Create a `.github/workflows` folder in your GitHub repository.
Add a workflow that triggers this action. For more info, see
the following examples of GitHub workflows.The Wesnoth version that the resources are checked against can
be specified with the `wesnoth-version` parameter. It can match
any Wesnoth [branch](https://github.com/wesnoth/wesnoth/branches)
or [tag](https://github.com/wesnoth/wesnoth/tags).The folder or file that should be validated can be specified with
the `path` parameter. By default, the entire project will be verified.Command line flags passed to the `wmlscope` tool can be specified
with the `flags` parameter. By default, the `-u` flag is passed,
so that unresolved macro references and other issues within WML files
are reported. When overriding the default value, consider adding `-u`
for a in-depth issues report. See [the `wmlscope` documentation](https://wiki.wesnoth.org/Maintenance_Tools#wmlscope)
for a complete list of supported flags.### Examples
A workflow that verifies resources on every push to the repository,
as well as every pull request:```yaml
name: checkon: [push, pull_request]
jobs:
check:
runs-on: ubuntu-lateststeps:
- name: Repository checkout
uses: actions/checkout@v2
- name: Verify resources scope
uses: czyzby/wesnoth-wml-scope@v1
```A workflow that verifies resources in the `units/` folder against
Wesnoth 1.16 `wmlscope` with custom flags on every push or pull
request to a specific branch:```yaml
name: checkon:
push:
branches: [ main ]
pull_request:
branches: [ main ]jobs:
check:
runs-on: ubuntu-lateststeps:
- name: Repository checkout
uses: actions/checkout@v2
- name: Verify resources scope
uses: czyzby/wesnoth-wml-scope@v1
with:
path: units/
wesnoth-version: 1.16
flags: --unchecked
```## Notes
Use `@v1` for the latest stable release. Use `@latest` for the latest
version directly from the default development branch.### See also
* [`czyzby/wesnoth-wml-linter`](https://github.com/czyzby/wesnoth-wml-linter):
a GitHub Action that verifies WML files with `wmllint` and `wmlindent`.
* [`czyzby/wesnoth-png-optimizer`](https://github.com/czyzby/wesnoth-png-optimizer):
a GitHub Action that verifies if PNG images are optimized with `woptipng`.