Skip to content

upgrade pygls

upgrade pygls #587

Workflow file for this run

---
name: Continous integration of Salt LSP
on:
push:
branches:
- "main"
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10']
name: run tests for python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4.7.0
with:
python-version: ${{ matrix.python-version }}
- uses: Gr1N/setup-poetry@v8
- uses: actions/cache@v3.3.1
with:
path: ~/.cache/pypoetry/virtualenvs
key: poetry-${{ hashFiles('poetry.lock') }}
- name: install dependencies
run: poetry install
- name: run the tests
run: poetry run pytest
- name: upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: false
flags: "unittests,python-${{ matrix.python-version }}"
- name: generate the cached completion data and try to launch the server
run: |
poetry run dump_state_name_completions
poetry run salt_lsp_server --stop-after-init
- name: build the package, install it and launch the lsp server
run: |
poetry build
pip install --user --force-reinstall dist/*whl
mkdir tmp
pushd tmp
python -m salt_lsp --stop-after-init
lint:
name: lint and format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4.7.0
- uses: Gr1N/setup-poetry@v8
- uses: actions/cache@v3.3.3
with:
path: ~/.cache/pypoetry/virtualenvs
key: poetry-${{ hashFiles('poetry.lock') }}
- name: install dependencies
run: poetry install
- name: run black
run: poetry run black --check --diff salt_lsp/*py tests/*py
- name: run mypy
run: poetry run mypy salt_lsp/*py
- name: run pylint
run: poetry run pylint --fail-under 9.2 salt_lsp/*py