Skip to content

Commit

Permalink
check for tests before running CI check (coAIthored)
Browse files Browse the repository at this point in the history
  • Loading branch information
colevandersWands committed Dec 26, 2024
1 parent 368ebaf commit 81a1ce6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/ci-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: python version
run: python --version
shell: bash

- name: Check for test files
id: check_tests
run: |
if find . -type f -name "test_*.py" | grep -q .; then
echo "has_tests=true" >> $GITHUB_OUTPUT
else
echo "has_tests=false" >> $GITHUB_OUTPUT
fi
shell: bash

- name: Python - Run Tests
if: steps.check_tests.outputs.has_tests == 'true'
run: python -m unittest
shell: bash

0 comments on commit 81a1ce6

Please sign in to comment.