forked from pandas-dev/pandas-stubs
-
Notifications
You must be signed in to change notification settings - Fork 0
111 lines (97 loc) · 3.05 KB
/
comment_commands.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: Comment Commands
on:
issue_comment:
types: created
permissions:
actions: write
checks: write
contents: write
deployments: write
id-token: write
issues: write
discussions: write
packages: write
pages: write
pull-requests: write
repository-projects: write
security-events: write
statuses: write
jobs:
nightly:
runs-on: ubuntu-latest
timeout-minutes: 10
if: (github.event.issue.pull_request) && github.event.comment.body == '/nightly'
steps:
- uses: actions/checkout@v3
- name: Install project dependencies
uses: ./.github/setup
with:
os: ubuntu-latest
python-version: "3.11"
- name: Run pytest (against pandas nightly)
id: tests-step
run: poetry run poe pytest --nightly
- name: Report tests check
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: |
echo "$GITHUB_CONTEXT"
- name: get sha from PR number and save output
id: get-sha
uses: actions/github-script@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
console.log('PR number: ' + ${{ github.event.issue.number }})
const pr = await github.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: ${{ github.event.issue.number }}
})
console.log('PR Head sha: ' + pr.data.head.sha)
core.setOutput('sha', pr.data.head.sha)
#
- name: Report tests check
if: ${{ steps.tests-step.outcome }}
uses: actions/github-script@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.checks.create({
name: 'run tests',
head_sha: '${{ github.event.issue.pull_request.head.sha }}',
status: 'completed',
conclusion: '${{ steps.tests-step.outcome }}',
output: {
title: 'Run tests',
summary: 'Results: ${{ steps.tests-step.outcome }}'
},
owner: context.repo.owner,
repo: context.repo.repo
})
mypy_nightly:
runs-on: ubuntu-latest
timeout-minutes: 10
if: (github.event.issue.pull_request) && github.event.comment.body == '/mypy_nightly'
steps:
- uses: actions/checkout@v3
- name: Install project dependencies
uses: ./.github/setup
with:
os: ubuntu-latest
python-version: "3.11"
- name: Run mypy tests with mypy nightly
run: poetry run poe mypy --mypy_nightly
pyright_strict:
runs-on: ubuntu-latest
timeout-minutes: 10
if: (github.event.issue.pull_request) && github.event.comment.body == '/pyright_strict'
steps:
- uses: actions/checkout@v3
- name: Install project dependencies
uses: ./.github/setup
with:
os: ubuntu-latest
python-version: "3.11"
- name: Run pyright tests with full strict mode
run: poetry run poe pyright_strict