Skip to content

Test issue

Test issue #14

name: Comment Commands
on:
issue_comment:
types: created
permissions:
contents: read
actions: write
checks: write
contents: write

Check failure on line 10 in .github/workflows/comment_commands.yml

View workflow run for this annotation

GitHub Actions / Comment Commands

Invalid workflow file

The workflow is not valid. .github/workflows/comment_commands.yml (Line: 10, Col: 3): 'contents' is already defined
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: '${{ steps.get-sha.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