Skip to content

Test issue

Test issue #19

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 == '/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: Get head sha and store value
id: get-sha
uses: actions/github-script@v3
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
uses: actions/github-script@v3
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 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
id: tests-step
run: poetry run poe mypy --mypy_nightly
- name: Get head sha and store value
id: get-sha
uses: actions/github-script@v3
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
uses: actions/github-script@v3
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 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@v3
- 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
id: get-sha
uses: actions/github-script@v3
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
uses: actions/github-script@v3
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 tests',
summary: 'Results: ${{ steps.tests-step.outcome }}'
},
owner: context.repo.owner,
repo: context.repo.repo
})