xenadmin/.github/workflows/main.yml
Danilo Del Busso 596f76ddcb
CA-361926: Ensure Messages.resx in XenCenter stays alphabetically sorted (#2915)
* CA-361926: Add script to check sorting of Messages.resx

Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>

* CA-361926: Add string sorting to PR/push checks

Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>

* CA-361926: Add script to sort strings in Messages.resx

Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>

* CA-361926: Allow multi-path input for string sorting scripts

Also improved output to help with errors

Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>

* CA-361926: Add localization option to string sorting scripts

Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>

* CA-361926: Specify encoding in string sorting scripts

Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>

* CA-361926: Update `main.yml` to reflect changes to string checking scripts

Also add other `.resx` files

Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>

* CA-361926: Remove case sensitive equality for boolean operation

Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>

* CA-361926: Rename `Get-Path` into `Get-ResolvedPath`

Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>

* CA-361926: Remove unused variable

Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>

* CA-361926: Add exit code check before executing string sorting check for `Branding.resx`

Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>

* CA-361926: Improve readability of string sorting scripts

Changed spacing using automatic formatter

Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>

* CA-361926: Fix exit message in string sorting scripts

Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
2022-01-05 11:14:21 +00:00

42 lines
1.3 KiB
YAML

name: Run checks
on: [push, pull_request]
jobs:
job-checks:
name: Run checks
runs-on: windows-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Run copyright check
shell: powershell
run: ./scripts/check_copyright.ps1 -NOISY
- name: Run I18n check
shell: powershell
run: ./scripts/check_i18n.ps1 -NOISY
- name: Run spell check
shell: powershell
run: |
# package support for windows is not great; this is ugly, but will do for now
choco install cyg-get --no-progress
cyg-get.bat aspell aspell-en
$env:Path += ";C:\tools\cygwin\bin;"
./scripts/check_spelling.ps1 -NOISY
- name: Run string sort check
shell: powershell
run: ./scripts/check_strings_sorting.ps1 `
-CHECK_LOCALIZED `
-NOISY `
-PATHS ./XenModel/Messages.resx, ./XenModel/FriendlyNames.resx, `
./XenModel/InvisibleMessages.resx, ./XenModel/UnitStrings.resx, `
./XenOvfApi/Content.resx, ./XenOvfApi/Messages.resx; `
if($lastexitcode -eq 0){ `
./scripts/check_strings_sorting.ps1 `
-NOISY `
-PATHS ./Branding/Branding.resx `
}