-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the test coverage report and reviewer check (#131)
- Could view test coverage report online. - Need specific user review.
- Loading branch information
1 parent
f57bde0
commit fc82ffb
Showing
5 changed files
with
75 additions
and
27 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[html] | ||
directory = coverage | ||
|
||
[run] | ||
data_file = .coverage_$LOCAL_RANK |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: approve | ||
|
||
on: | ||
pull_request: | ||
branches: [ "main" ] | ||
types: [opened, synchronize, reopened] | ||
|
||
jobs: | ||
approve: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Get PR Approvals | ||
run: | | ||
PR_NUMBER=$(jq --raw-output .number "$GITHUB_EVENT_PATH") | ||
APPROVERS=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
"https://api.github.com/repos/${{ github.repository }}/pulls/$PR_NUMBER/reviews" \ | ||
| jq -r '.[] | select(.state == "APPROVED") | .user.login') | ||
echo "APPROVERS=$APPROVERS" >> $GITHUB_ENV | ||
- name: Check for Specific Approver | ||
run: | | ||
SPECIFIC_APPROVER="aoyulong" | ||
if echo "$APPROVERS" | grep -q "$SPECIFIC_APPROVER"; then | ||
echo "Specific approver has approved the PR." | ||
else | ||
echo "The PR has not been approved by the specific approver." | ||
exit 1 | ||
fi |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
torchrun --nproc_per_node=8 -m pytest --import-mode=importlib -q -x tests/unit_tests/launcher | ||
torchrun --nproc_per_node=8 -m pytest --import-mode=importlib --cov-append --cov-report=html:./cov-report-flagscale --cov=flagscale -q -x tests/unit_tests/launcher |
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