Skip to content

feat: 修改ci

feat: 修改ci #1

Workflow file for this run

name: 检查代码

Check failure on line 1 in .github/workflows/check.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/check.yml

Invalid workflow file

you may only define one of `paths` and `paths-ignore` for a single event
on:
push:
paths:
- 'pyproject.toml'
- '**/*.py'
- 'Taskfile.yml'
- '.github/workflows/*.yml'
- '.github/dependabot.yml'
- 'protobufs/**'
- 'recipes/**'
paths-ignore:
- '.gitignore'
- '*.md'
- '*.rst'
- 'LICENSE'
- 'Vagrantfile'
- 'protobufs/**'
- 'recipes/**'
pull_request:
paths:
- 'pyproject.toml'
- '**/*.py'
- 'Taskfile.yml'
- '.github/workflows/*.yml'
- '.github/dependabot.yml'
paths-ignore:
- '.gitignore'
- '*.md'
- '*.rst'
- 'LICENSE'
- 'Vagrantfile'
- 'protobufs/**'
- 'recipes/**'
schedule:
- cron: '37 23 * * 5'
permissions:
contents: read
jobs:
pytest:
name: Run pytest
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
- uses: arduino/setup-task@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run pytest
run: task test
ruff:
name: Ruff
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
- uses: arduino/setup-task@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run ruff
run: task check -- --no-fix --output-format=github
codeql:
name: CodeQL
runs-on: ubuntu-latest
permissions:
security-events: write
packages: read
actions: read
steps:
- uses: actions/checkout@v4
- name: Setup CodeQL
uses: github/codeql-action/init@v3
with:
languages: python
- name: Run CodeQL
uses: github/codeql-action/analyze@v3
with:
category: '/language:python'