File: static.yml

package info (click to toggle)
python-lsp-server 1.14.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 836 kB
  • sloc: python: 8,297; sh: 12; makefile: 4
file content (50 lines) | stat: -rw-r--r-- 1,534 bytes parent folder | download
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
name: Static code analysis

on:
  push:
    branches:
      - develop

  pull_request:
    branches:
      - '*'

concurrency:
  group: static-${{ github.ref }}
  cancel-in-progress: true

jobs:
  build:
    name: Static code analysis
    runs-on: ubuntu-latest
    env:
      CI: 'true'
      OS: 'linux'
    timeout-minutes: 2
    steps:
      - uses: actions/cache@v4
        with:
          path: ~/.cache/pip
          key: static-pip-${{ hashFiles('pyproject.toml') }}
          restore-keys: static-pip-
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: '3.9'
          architecture: 'x64'
      - run: python -m pip install --upgrade pip setuptools jsonschema
      # If we don't install pycodestyle, pylint will throw an unused-argument error in pylsp/plugins/pycodestyle_lint.py:72
      # This error cannot be resolved by adding a pylint: disable=unused-argument comment ...
      - run: |
          pip install -e .[pylint,pycodestyle]
          pip install ruff==0.9.4
      - name: ruff linter and code style checks
        run: ruff check pylsp test
      - name: ruff code formatter check
        run: ruff format --check pylsp test
      - name: Validate JSON schema
        run: echo {} | jsonschema pylsp/config/schema.json
      - name: Ensure JSON schema and Markdown docs are in sync
        run: |
          python scripts/jsonschema2md.py pylsp/config/schema.json EXPECTED_CONFIGURATION.md
          diff EXPECTED_CONFIGURATION.md CONFIGURATION.md