@@ -21,23 +21,10 @@ jobs:
2121 if : (github.event.issue.pull_request) && contains(fromJSON('["/pandas_nightly", "/pyright_strict", "/mypy_nightly"]'), github.event.comment.body)
2222
2323 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
3825 # get the sha of the last commit to attach the results of the tests
3926 if : always()
40- id : get-sha
27+ id : get-branch-info
4128 uses : actions/github-script@v7
4229 with :
4330 github-token : ${{ secrets.GITHUB_TOKEN }}
4835 pull_number: ${{ github.event.issue.number }}
4936 })
5037 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] }}
5155
5256 - name : Report results of the tests and publish
5357 # publish the results to a check run no matter the pass or fail
5862 script : |
5963 github.rest.checks.create({
6064 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 }}',
6266 status: 'completed',
6367 conclusion: '${{ steps.tests-step.outcome }}',
6468 output: {
0 commit comments