Some checks failed
Python Test / python-test (pull_request) Failing after 10s
65 lines
1.5 KiB
YAML
65 lines
1.5 KiB
YAML
name: Python Lint with Ruff
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
- develop
|
|
paths:
|
|
- 'src/**'
|
|
- 'tests/**'
|
|
- 'pyproject.toml'
|
|
- 'ruff.toml'
|
|
- 'requirements.txt'
|
|
- 'requirements-dev.txt'
|
|
|
|
jobs:
|
|
python-lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Install dependencies
|
|
id: installDependencies
|
|
run: |
|
|
pip install -r requirements.txt
|
|
pip install -r requirements-dev.txt
|
|
|
|
|
|
# - name: Run Ruff Lint
|
|
# id: runRuffLint
|
|
# run: |
|
|
|
|
|
|
- name: pull_request message with Ruff Lint results
|
|
id: prMessageRuffLint
|
|
run: |
|
|
curl -X POST \
|
|
-H "Content-Type: application/json" \
|
|
-H "Authorization: token ${GITEA_TOKEN}" \
|
|
-d "{\"body\": \"## :mag: Ruff Lint Results\n\`\`\`\ntest\n\`\`\`\"}" \
|
|
${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/issues/${{ github.event.pull_request.number }}/comments
|
|
env:
|
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
|
|
|
|
|
|
# github
|
|
# - name: pull_request message with Ruff Lint results
|
|
# id: prMessageRuffLint
|
|
# uses: marocchino/sticky-pull-request-comment@v2
|
|
# with:
|
|
# header: "## :mag: Ruff Lint Results"
|
|
# message: |
|
|
# ```
|
|
# test
|
|
# ```
|
|
|