Skip to content

Commit

Permalink
Add pygls repository tests as smoke test (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
karthiknadig authored Mar 3, 2023
1 parent be5f191 commit 2307fec
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 2 deletions.
50 changes: 48 additions & 2 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:

jobs:
build-vsix:
build-package:
name: Create Packages
runs-on: ubuntu-latest
steps:
Expand All @@ -31,7 +31,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python: ['3.7', '3.8', '3.9', '3.10', '3.11']

steps:
- name: Checkout
Expand All @@ -49,3 +49,49 @@ jobs:
- name: Run tests
run: python -m nox --session tests
shell: bash

smoke-tests:
name: Smoke Tests (pygls)
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python: ['3.7', '3.8', '3.9', '3.10', '3.11']

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Checkout Pygls
uses: actions/checkout@v3
with:
repository: openlawlibrary/pygls
path: smoke_tests

- name: Use Python ${{ matrix.python }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}

- name: Update pip, install wheel
run: python -m pip install -U pip wheel
shell: bash

- name: Install pip pygls dependencies
run: python -m pip install typeguard mock pytest pytest-asyncio
shell: bash

- name: Install pip lsprotocol dependencies
run: python -m pip install -r ./packages/python/requirements.txt
shell: bash

- name: Pip List
run: python -m pip list
shell: bash

- name: Run Tests
run: python -m pytest smoke_tests/tests
env:
PYTHONPATH: ./packages/python
shell: bash
15 changes: 15 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
singleQuote: true,
printWidth: 120,
tabWidth: 4,
endOfLine: 'auto',
trailingComma: 'all',
overrides: [
{
files: ['*.yml', '*.yaml'],
options: {
tabWidth: 2
}
}
]
};
9 changes: 9 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"recommendations": [
"esbenp.prettier-vscode",
"ms-python.python",
"ms-python.vscode-pylance",
"ms-python.black-formatter",
"ms-python.isort"
]
}

0 comments on commit 2307fec

Please sign in to comment.