Skip to content

Commit fedfeb2

Browse files
Test
1 parent be23821 commit fedfeb2

File tree

1 file changed

+38
-3
lines changed

1 file changed

+38
-3
lines changed

.github/workflows/comment_commands.yml

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,12 @@ on:
55

66
permissions:
77
contents: read
8-
issues: write
9-
pull-requests: write
108

119
jobs:
1210
nightly:
1311
runs-on: ubuntu-latest
1412
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'
1614

1715
steps:
1816
- uses: actions/checkout@v3
@@ -24,7 +22,44 @@ jobs:
2422
python-version: "3.11"
2523

2624
- name: Run pytest (against pandas nightly)
25+
id: tests-step
2726
run: poetry run poe pytest --nightly
27+
- name: Report tests check
28+
run: |
29+
echo "$GITHUB_CONTEXT"
30+
31+
- name: get sha from PR number and save output
32+
id: get-sha
33+
uses: actions/github-script@v3
34+
with:
35+
github-token: ${{ secrets.GITHUB_TOKEN }}
36+
script: |
37+
console.log('PR number: ' + ${{ github.event.issue.number }})
38+
const pr = await github.pulls.get({
39+
owner: context.repo.owner,
40+
repo: context.repo.repo,
41+
pull_number: ${{ github.event.issue.number }}
42+
})
43+
console.log('PR Head sha: ' + pr.data.head.sha)
44+
core.setOutput('sha', pr.data.head.sha)
45+
# - name: Report tests check
46+
# if: ${{ github.event.inputs.used-branch && steps.tests-step.outcome }}
47+
# uses: actions/github-script@v3
48+
# with:
49+
# github-token: ${{ secrets.GITHUB_TOKEN }}
50+
# script: |
51+
# github.checks.create({
52+
# name: 'run tests',
53+
# head_sha: '${{ github.event.issue.pull_request.head.sha }}',
54+
# status: 'completed',
55+
# conclusion: '${{ steps.tests-step.outcome }}',
56+
# output: {
57+
# title: 'Run tests',
58+
# summary: 'Results: ${{ steps.tests-step.outcome }}'
59+
# },
60+
# owner: context.repo.owner,
61+
# repo: context.repo.repo
62+
# })
2863

2964
mypy_nightly:
3065
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)