Skip to content

Commit

Permalink
Make docs tests skipped with proper message [docs only]
Browse files Browse the repository at this point in the history
  • Loading branch information
matteobachetti committed Aug 24, 2023
1 parent 5bdef91 commit cb7c637
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/ci_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,31 @@ env:
TOXARGS: '-v'

jobs:

check_commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}

- name: check if message contain keywords ace scopeid
id: check_commit
run: |
message=$(git log -1 --pretty=format:'%s')
re="\[(doc|skip-tests).*\]"
if [[ $message =~ $re ]]; then
echo "::set-output name=match::true"
echo "$message -> Match is true"
else
echo "$message -> Match is false"
fi
outputs:
match: ${{ steps.check_commit.outputs.match }}

ci-tests:
needs: check_commit
if: ${{ needs.check_commit.outputs.match != 'true' }}
name: ${{ matrix.os }}, ${{ matrix.tox_env }}
runs-on: ${{ matrix.os }}
strategy:
Expand Down Expand Up @@ -85,6 +109,7 @@ jobs:
run: sudo apt-get -y install graphviz pandoc
- name: Print Python, pip, setuptools, and tox versions
run: |
echo Running $(git show -1 --format=%s)
python -c "import sys; print(f'Python {sys.version}')"
python -c "import pip; print(f'pip {pip.__version__}')"
python -c "import setuptools; print(f'setuptools {setuptools.__version__}')"
Expand Down

0 comments on commit cb7c637

Please sign in to comment.