-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Filter testsuite #5865
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
lrineau
merged 19 commits into
CGAL:master
from
maxGimeno:Testsuite-Filter_testsuite-maxGimeno
Jul 30, 2021
Merged
Filter testsuite #5865
Changes from 18 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
026907a
# Ceci est la combinaison de 7 commits.
maxGimeno 7a526ea
First step of action
maxGimeno 4635ac2
Add files for testresults
maxGimeno 5a20cf1
clean-up
maxGimeno f267964
Fix list_test_packages
maxGimeno 4acf4ca
test CGAL_VERSION value
maxGimeno 30a4390
test CGAL_VERSION value
maxGimeno e2e9f73
Use a queue
maxGimeno 477f723
Don't use a queue file after all
maxGimeno 02152ab
Fix CGAL_VERSION
maxGimeno ab0a35b
debug liste
maxGimeno 7ee8667
debuf list
maxGimeno 352cb7b
plus
maxGimeno dec96f5
fix sourcing
maxGimeno 2a861a7
Fix list_of_pkgs
maxGimeno 78461e0
Merge remote-tracking branch 'cgal/master' into Testsuite-Filter_test…
maxGimeno 22a61aa
remove debug
maxGimeno f9e2b63
CLea-up and simplify
maxGimeno 618b439
Factorize condition
maxGimeno File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,72 @@ | ||
| name: Filter Testsuite | ||
|
|
||
| on: | ||
| issue_comment: | ||
| types: [created] | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/github-script@v3 | ||
| if: github.event.comment.user.login == 'maxGimeno' && contains(github.event.comment.body, '/testme') | ||
| id: get_label | ||
| with: | ||
| result-encoding: string | ||
| script: | | ||
| //get branch name and username | ||
| const pr_url = context.payload.issue.pull_request.url | ||
| const pr_content = await github.request(pr_url) | ||
| const label = pr_content.data.head.label | ||
| const base = pr_content.data.base.ref | ||
| console.log(label) | ||
| return label+":"+base | ||
| - name: Run Testsuite | ||
| if: github.event.comment.user.login == 'maxGimeno' && contains(github.event.comment.body, '/testme') | ||
| run: | | ||
| mkdir -p ~/.ssh | ||
| #ssh key | ||
| ( | ||
| cat <<EOF | ||
| ${{ secrets.ssh_key }} | ||
| EOF | ||
| )>> ~/.ssh/id_rsa | ||
| chmod 600 /home/runner/.ssh/id_rsa | ||
| #ssh public key | ||
| ( | ||
| cat <<EOF | ||
| ${{ secrets.ssh_key_pub }} | ||
| EOF | ||
| )>> ~/.ssh/id_rsa.pub | ||
| chmod 644 /home/runner/.ssh/id_rsa.pub | ||
| #known hosts | ||
| wget --no-check-certificate https://cgal.geometryfactory.com/CGAL/ssh_known_hosts -O ~/.ssh/known_hosts | ||
| #config file | ||
| wget --no-check-certificate https://cgal.geometryfactory.com/CGAL/ssh_config -O ~/.ssh/config | ||
| #list of hosts | ||
| wget --no-check-certificate https://cgal.geometryfactory.com/CGAL/ssh_host_list -O ~/ssh_host_list | ||
| #ssh command | ||
| LABEL="${{ steps.get_label.outputs.result }}" | ||
| USER_NAME=$(echo $LABEL | cut -d':' -f 1) | ||
| BRANCH_NAME=$(echo $LABEL | cut -d':' -f 2) | ||
| BASE=$(echo $LABEL | cut -d':' -f 3) | ||
| PR_NUMBER=${{ github.event.issue.number }} | ||
| mapfile -t HOSTS < ~/ssh_host_list; | ||
| for i in ${!HOSTS[@]}; do | ||
| HOST=$(echo ${HOSTS[$i]}|cut -d' ' -f 1 ) | ||
| PATH_TO_SCRIPT=$(echo ${HOSTS[$i]}|cut -d' ' -f 2 ) | ||
| echo "ssh ${HOST} ${PATH_TO_SCRIPT}/run_testsuite_from_branch_name.sh $USER_NAME $BRANCH_NAME $BASE $PR_NUMBER" | ||
| ssh ${HOST} "${PATH_TO_SCRIPT}/run_testsuite_from_branch_name.sh $USER_NAME $BRANCH_NAME $BASE $PR_NUMBER" | ||
| done | ||
| - name: Post address | ||
| uses: actions/github-script@v3 | ||
| if: github.event.comment.user.login == 'maxGimeno' && contains(github.event.comment.body, '/testme') | ||
| with: | ||
| script: | | ||
| const address = "The testsuite is lauched. results will be found, after it is done, here : https://cgal.geometryfactory.com/~mgimeno/test_suite/TESTRESULTS/index.shtml " | ||
| github.issues.createComment({ | ||
| owner: "maxGimeno", | ||
| repo: "cgal", | ||
| issue_number: ${{ github.event.issue.number }}, | ||
| body: address | ||
| }); | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you use
jobs.<job_id>.steps[*].if, and the conditional could be factorized to the job, usingjobs.<job_id>.if, I think. I have not tested. I just read the doc.