ci(workflows): add test and validation workflows for regex patterns

This commit is contained in:
Sam Chau
2025-08-27 05:51:34 +09:30
parent 4c6ca5c13c
commit 8577ef5cde
2 changed files with 33 additions and 8 deletions

26
.github/workflows/testRegex.yml vendored Normal file
View File

@@ -0,0 +1,26 @@
name: Test Regex
on:
push:
paths:
- "regex_patterns/**/*.yml"
- "regex_patterns/**/*.yaml"
- ".github/workflows/testRegex.yml"
- "scripts/testPatterns.ps1"
pull_request:
paths:
- "regex_patterns/**/*.yml"
- "regex_patterns/**/*.yaml"
- ".github/workflows/testRegex.yml"
- "scripts/testPatterns.ps1"
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
container: mcr.microsoft.com/powershell:lts
steps:
- uses: actions:checkout@v4
- name: Test Patterns
run: pwsh scripts/testPatterns.ps1

View File

@@ -1,18 +1,20 @@
name: Regular Expressions
name: Validate Regex
on:
push:
paths:
- "regex_patterns/**/*.yml"
- "regex_patterns/**/*.yaml"
- ".github/workflows/regex.yml"
- ".github/workflows/validateRegex.yml"
- "scripts/validatePattern.ps1"
- "scripts/validateAllPatterns.ps1"
pull_request:
paths:
- "regex_patterns/**/*.yml"
- "regex_patterns/**/*.yaml"
- ".github/workflows/regex.yml"
- ".github/workflows/validateRegex.yml"
- "scripts/validatePattern.ps1"
- "scripts/validateAllPatterns.ps1"
workflow_dispatch:
jobs:
@@ -22,8 +24,5 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: validate
- name: Validate Patterns
run: pwsh scripts/validateAllPatterns.ps1
- name: test
run: pwsh scripts/testPatterns.ps1