@@ -21,23 +21,10 @@ jobs:
21
21
if : (github.event.issue.pull_request) && contains(fromJSON('["/pandas_nightly", "/pyright_strict", "/mypy_nightly"]'), github.event.comment.body)
22
22
23
23
steps :
24
- - uses : actions/checkout@v4
25
-
26
- - name : Install project dependencies
27
- uses : ./.github/setup
28
- with :
29
- os : ubuntu-latest
30
- python-version : " 3.11"
31
-
32
- - name : Run ${{ fromJSON(env.DISPLAY_COMMAND)[github.event.comment.body] }}
33
- # run the tests based on the value of the comment
34
- id : tests-step
35
- run : poetry run poe ${{ fromJSON(env.RUN_COMMAND)[github.event.comment.body] }}
36
-
37
- - name : Get head sha and store value
24
+ - name : Get head sha, branch name and store value
38
25
# get the sha of the last commit to attach the results of the tests
39
26
if : always()
40
- id : get-sha
27
+ id : get-branch-info
41
28
uses : actions/github-script@v7
42
29
with :
43
30
github-token : ${{ secrets.GITHUB_TOKEN }}
48
35
pull_number: ${{ github.event.issue.number }}
49
36
})
50
37
core.setOutput('sha', pr.data.head.sha)
38
+ core.setOutput('branch', pr.data.head.ref)
39
+
40
+ - name : Checkout code on the correct branch
41
+ uses : actions/checkout@v4
42
+ with :
43
+ ref : ${{ steps.get-branch-info.outputs.branch }}
44
+
45
+ - name : Install project dependencies
46
+ uses : ./.github/setup
47
+ with :
48
+ os : ubuntu-latest
49
+ python-version : " 3.11"
50
+
51
+ - name : Run ${{ fromJSON(env.DISPLAY_COMMAND)[github.event.comment.body] }}
52
+ # run the tests based on the value of the comment
53
+ id : tests-step
54
+ run : poetry run poe ${{ fromJSON(env.RUN_COMMAND)[github.event.comment.body] }}
51
55
52
56
- name : Report results of the tests and publish
53
57
# publish the results to a check run no matter the pass or fail
58
62
script : |
59
63
github.rest.checks.create({
60
64
name: '${{ fromJSON(env.DISPLAY_COMMAND)[github.event.comment.body] }}',
61
- head_sha: '${{ steps.get-sha .outputs.sha }}',
65
+ head_sha: '${{ steps.get-branch-info .outputs.sha }}',
62
66
status: 'completed',
63
67
conclusion: '${{ steps.tests-step.outcome }}',
64
68
output: {
0 commit comments