Skip to content

Upgrade JS dependencies #9

Upgrade JS dependencies

Upgrade JS dependencies #9

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/[email protected]
with:
python-version: ${{ matrix.python-version }}
- uses: Gr1N/setup-poetry@v8
- uses: actions/[email protected]
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/[email protected]
- uses: Gr1N/setup-poetry@v8
- uses: actions/[email protected]
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