7
7
jobs :
8
8
windows_test_preparation :
9
9
runs-on : ubuntu-latest
10
- if : ${{ github.event.issue.pull_request && github.event.comment.body == '/start Windows testing ' }}
10
+ if : ${{ github.event.issue.pull_request && github.event.comment.body == '/testwin ' }}
11
11
steps :
12
12
- name : react_to_comment
13
13
uses : actions/github-script@v4
@@ -34,14 +34,13 @@ jobs:
34
34
});
35
35
return pr.data.head.sha
36
36
- name : update_pr_status_pending
37
- run : |
38
- gh api --method POST -H "Accept: application/vnd.github+json" /repos/$OWNER/$REPO/statuses/$SHA -f state='pending' -f target_url='${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' -f description='The build started2!' -f context='Windows pre-commit'
39
- echo "REF == = = = = = = ${{ steps.sha.outputs.result }}"
40
37
env :
41
38
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
42
39
OWNER : ${{ github.repository_owner }}
43
40
REPO : ${{ github.event.repository.name }}
44
41
SHA : ${{ steps.sha.outputs.result }}
42
+ run : |
43
+ gh api --method POST -H "Accept: application/vnd.github+json" /repos/$OWNER/$REPO/statuses/$SHA -f state='pending' -f target_url='${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' -f description='Working on testing. This will take a while' -f context='Windows pre-commit'
45
44
outputs :
46
45
PR_SHA : ${{ steps.sha.outputs.result }}
47
46
@@ -56,32 +55,23 @@ jobs:
56
55
57
56
windows_test_completion :
58
57
runs-on : ubuntu-latest
59
- needs : [windows_default]
58
+ needs : [windows_test_preparation, windows_default]
60
59
steps :
61
60
- name : update_pr_status_success
62
61
if : always() && success()
63
- run : |
64
- gh api --method POST -H "Accept: application/vnd.github+json" /repos/$OWNER/$REPO/statuses/$SHA -f state='success' -f target_url='${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' -f description='The build started2!' -f context='Windows pre-commit'
65
62
env :
66
63
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
67
64
OWNER : ${{ github.repository_owner }}
68
65
REPO : ${{ github.event.repository.name }}
69
- SHA : ${{ steps.sha.outputs.result }}
66
+ SHA : ${{ needs.windows_test_preparation.outputs.PR_SHA }}
67
+ run : |
68
+ gh api --method POST -H "Accept: application/vnd.github+json" /repos/$OWNER/$REPO/statuses/$SHA -f state='success' -f target_url='${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' -f description='The operation completed successfully' -f context='Windows pre-commit'
70
69
- name : update_pr_status_failure
71
70
if : failure()
72
- run : |
73
- gh api --method POST -H "Accept: application/vnd.github+json" /repos/$OWNER/$REPO/statuses/$SHA -f state='failure' -f target_url='${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' -f description='The build started2!' -f context='Windows pre-commit'
74
71
env :
75
72
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
76
73
OWNER : ${{ github.repository_owner }}
77
74
REPO : ${{ github.event.repository.name }}
78
- SHA : ${{ steps.sha.outputs.result }}
79
-
80
- # windows_default:
81
- # runs-on: ubuntu-latest
82
- # needs: [windows_test_preparation]
83
- # steps:
84
- # - name: print_ref
85
- # run: |
86
- # echo "REF == = = = = = = ${{github.ref}}"
87
- # echo "REF == = = = = = = ${{ needs.windows_test_preparation.outputs.PR_SHA }}"
75
+ SHA : ${{ needs.windows_test_preparation.outputs.PR_SHA }}
76
+ run : |
77
+ gh api --method POST -H "Accept: application/vnd.github+json" /repos/$OWNER/$REPO/statuses/$SHA -f state='failure' -f target_url='${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' -f description='Testing failed successfully' -f context='Windows pre-commit'
0 commit comments