Skip to content

Commit

Permalink
for test
Browse files Browse the repository at this point in the history
  • Loading branch information
DavdGao committed Jan 7, 2025
1 parent 5f5701a commit f48f7d5
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 40 deletions.
27 changes: 26 additions & 1 deletion .github/workflows/sphinx_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,32 @@ on:
- main

jobs:
pages:
check-approval-and-run-script:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Check for approval
id: check_approval
run: |
# Fetch reviews for the pull request
response=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${GITHUB_REPOSITORY}/pulls/${{ github.event.pull_request.number }}/reviews)
# Count the number of APPROVED reviews
approvals=$(echo "$response" | grep '"state": "APPROVED"' | wc -l)
echo "Approvals: $approvals"
if [ "$approvals" -lt 1 ]; then
echo "No approvals yet."
exit 1
fi
build_tutorial:
needs: check-approval-and-run-script
timeout-minutes: 20
runs-on: ${{ matrix.os }}
strategy:
Expand Down
39 changes: 0 additions & 39 deletions .github/workflows/unittest.yml

This file was deleted.

0 comments on commit f48f7d5

Please sign in to comment.