|
5 | 5 |
|
6 | 6 | permissions:
|
7 | 7 | contents: read
|
8 |
| - issues: write |
9 |
| - pull-requests: write |
10 | 8 |
|
11 | 9 | jobs:
|
12 | 10 | nightly:
|
13 | 11 | runs-on: ubuntu-latest
|
14 | 12 | timeout-minutes: 10
|
15 |
| - if: (!github.event.issue.pull_request) && github.event.comment.body == '/nightly' |
| 13 | + if: (github.event.issue.pull_request) && github.event.comment.body == '/nightly' |
16 | 14 |
|
17 | 15 | steps:
|
18 | 16 | - uses: actions/checkout@v3
|
|
24 | 22 | python-version: "3.11"
|
25 | 23 |
|
26 | 24 | - name: Run pytest (against pandas nightly)
|
| 25 | + id: tests-step |
27 | 26 | run: poetry run poe pytest --nightly
|
| 27 | + - name: Report tests check |
| 28 | + env: |
| 29 | + GITHUB_CONTEXT: ${{ toJson(github) }} |
| 30 | + run: | |
| 31 | + echo "$GITHUB_CONTEXT" |
| 32 | +
|
| 33 | + - name: get sha from PR number and save output |
| 34 | + id: get-sha |
| 35 | + uses: actions/github-script@v3 |
| 36 | + with: |
| 37 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 38 | + script: | |
| 39 | + console.log('PR number: ' + ${{ github.event.issue.number }}) |
| 40 | + const pr = await github.pulls.get({ |
| 41 | + owner: context.repo.owner, |
| 42 | + repo: context.repo.repo, |
| 43 | + pull_number: ${{ github.event.issue.number }} |
| 44 | + }) |
| 45 | + console.log('PR Head sha: ' + pr.data.head.sha) |
| 46 | + core.setOutput('sha', pr.data.head.sha) |
| 47 | + # - name: Report tests check |
| 48 | + # if: ${{ github.event.inputs.used-branch && steps.tests-step.outcome }} |
| 49 | + # uses: actions/github-script@v3 |
| 50 | + # with: |
| 51 | + # github-token: ${{ secrets.GITHUB_TOKEN }} |
| 52 | + # script: | |
| 53 | + # github.checks.create({ |
| 54 | + # name: 'run tests', |
| 55 | + # head_sha: '${{ github.event.issue.pull_request.head.sha }}', |
| 56 | + # status: 'completed', |
| 57 | + # conclusion: '${{ steps.tests-step.outcome }}', |
| 58 | + # output: { |
| 59 | + # title: 'Run tests', |
| 60 | + # summary: 'Results: ${{ steps.tests-step.outcome }}' |
| 61 | + # }, |
| 62 | + # owner: context.repo.owner, |
| 63 | + # repo: context.repo.repo |
| 64 | + # }) |
28 | 65 |
|
29 | 66 | mypy_nightly:
|
30 | 67 | runs-on: ubuntu-latest
|
|
0 commit comments