Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/smoke-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,33 @@ jobs:
split-index: 0
- run: echo "The output test suite is ${{ steps.split-tests.outputs.test-suite }}"

smoke-test-exclude-glob:
runs-on: ubuntu-latest
name: Smoke Test Exclude Glob
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
repository: eliotsykes/rspec-rails-examples
path: examples/
- uses: ./
id: split-tests
name: Run this action
with:
glob: examples/spec/**/*_spec.rb
exclude-glob: examples/spec/api/**/t*_spec.rb
split-total: 5
split-index: 0
- run: echo "The output test suite is ${{ steps.split-tests.outputs.test-suite }}"
- run: |
if echo "${{ steps.split-tests.outputs.test-suite }}" | grep -q '/token_spec.rb'; then
echo "token_spec.rb is included in the test-suite, failing the job."
exit 1
else
echo "token_spec.rb is not included in the test-suite, proceeding."
fi
name: Check for token_spec.rb

smoke-test-line:
runs-on: ubuntu-latest
name: Smoke Test Line Count
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ runs:

EXCLUDE_GLOB=""
if [ -n "${{ inputs.exclude-glob }}" ]; then
EXCLUDE_GLOB="-exclude-glob='${{ inputs.exclude-glob }}'"
EXCLUDE_GLOB="-exclude-glob=${{ inputs.exclude-glob }}"
fi

TESTS=$(./split_tests ${SPLIT_BY} -split-index=${{ inputs.split-index }} -split-total=${{ inputs.split-total }} -glob='${{ inputs.glob }}' ${EXCLUDE_GLOB})
Expand Down