forked from pandas-dev/pandas-stubs
-
Notifications
You must be signed in to change notification settings - Fork 0
174 lines (158 loc) · 5.25 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
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:
pandas_nightly:
runs-on: ubuntu-latest
timeout-minutes: 10
if: (github.event.issue.pull_request) && github.event.comment.body == '/pandas_nightly'
steps:
- uses: actions/checkout@v4
- 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: Get head sha and store value
if: always()
id: get-sha
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const pr = await github.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: ${{ github.event.issue.number }}
})
core.setOutput('sha', pr.data.head.sha)
#
- name: Report results of the tests and publish
if: always()
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.checks.create({
name: 'Pandas nightly tests',
head_sha: '${{ steps.get-sha.outputs.sha }}',
status: 'completed',
conclusion: '${{ steps.tests-step.outcome }}',
output: {
title: 'Run pandas nightly tests',
summary: 'Results: ${{ steps.tests-step.outcome }}',
text: 'See the actions run at ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}',
},
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@v4
- name: Install project dependencies
uses: ./.github/setup
with:
os: ubuntu-latest
python-version: "3.11"
- name: Run mypy tests with mypy nightly
id: tests-step
run: poetry run poe mypy --mypy_nightly
- name: Get head sha and store value
if: always()
id: get-sha
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const pr = await github.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: ${{ github.event.issue.number }}
})
core.setOutput('sha', pr.data.head.sha)
#
- name: Report results of the tests and publish
if: always()
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.checks.create({
name: 'Mypy nightly tests',
head_sha: '${{ steps.get-sha.outputs.sha }}',
status: 'completed',
conclusion: '${{ steps.tests-step.outcome }}',
output: {
title: 'Run mypy nightly tests',
summary: 'Results: ${{ steps.tests-step.outcome }}'
},
owner: context.repo.owner,
repo: context.repo.repo
})
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@v4
- name: Install project dependencies
uses: ./.github/setup
with:
os: ubuntu-latest
python-version: "3.11"
- name: Run pyright tests with full strict mode
id: tests-step
run: poetry run poe pyright_strict
- name: Get head sha and store value
if: always()
id: get-sha
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const pr = await github.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: ${{ github.event.issue.number }}
})
core.setOutput('sha', pr.data.head.sha)
#
- name: Report results of the tests and publish
if: always()
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.checks.create({
name: 'Pyright strict tests',
head_sha: '${{ steps.get-sha.outputs.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
})