Feature/fix to use correct syntax #17
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Integration Tests | |
on: | |
# workflow_dispatch: | |
pull_request: | |
branches: | |
- '**' | |
types: [ opened, synchronize, reopened ] | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: Test 1 - default | |
id: test_1 | |
uses: AbsaOSS/filename-inspector@feature/fix-to-use-correct-syntax | |
with: | |
name-patterns: '*UnitTest.*,*IntegrationTest.*' | |
paths: '**/src/test/java/**,**/src/test/scala/**' | |
- name: Test 2 - custom with multiple line inputs | |
id: test_2 | |
uses: AbsaOSS/filename-inspector@feature/fix-to-use-correct-syntax | |
with: | |
name-patterns: | | |
*UnitTest.*, | |
*IntegrationTest.* | |
paths: | | |
**/src/test/java/**, | |
**/src/test/scala/** | |
excludes: | | |
src/exclude_dir/*.py, | |
tests/exclude_file.py | |
report-format: 'console' | |
verbose-logging: 'true' | |
fail-on-violation: 'false' | |
- name: Check output violation count from Test 1 | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
const violationCount = parseInt('${{ steps.test_1.outputs.violation-count }}'); | |
const violationCount2 = parseInt("${{ steps.test_1.outputs.violation-count }}"); | |
const violationCount3 = parseInt(`${{ steps.test_1.outputs.violation-count }}`); | |
const violationCount4 = parseInt(`${{ steps.test_1.outputs['violation-count'] }}`); | |
console.log(`Test 1 violation count: ${violationCount}`); | |
if (violationCount !== 5) { | |
core.setFailed(`Wrong amount '${violationCount}' of violations detected in 'Test 1'`); | |
} | |
- name: Check output violation count from Test 2 | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
const violationCount = parseInt('${{ steps.test_2.outputs.violation-count }}'); | |
console.log(`Test 2 violation count: ${violationCount}`); | |
if (violationCount !== 5) { | |
core.setFailed(`Wrong amount '${violationCount}' of violations detected in 'Test 2'`); | |
} |