Skip to content

Commit 2307fec

Browse files
authored
Add pygls repository tests as smoke test (#177)
1 parent be5f191 commit 2307fec

File tree

3 files changed

+72
-2
lines changed

3 files changed

+72
-2
lines changed

.github/workflows/pr-check.yml

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
pull_request:
55

66
jobs:
7-
build-vsix:
7+
build-package:
88
name: Create Packages
99
runs-on: ubuntu-latest
1010
steps:
@@ -31,7 +31,7 @@ jobs:
3131
fail-fast: false
3232
matrix:
3333
os: [ubuntu-latest, windows-latest]
34-
python: ["3.7", "3.8", "3.9", "3.10", "3.11"]
34+
python: ['3.7', '3.8', '3.9', '3.10', '3.11']
3535

3636
steps:
3737
- name: Checkout
@@ -49,3 +49,49 @@ jobs:
4949
- name: Run tests
5050
run: python -m nox --session tests
5151
shell: bash
52+
53+
smoke-tests:
54+
name: Smoke Tests (pygls)
55+
runs-on: ${{ matrix.os }}
56+
strategy:
57+
fail-fast: false
58+
matrix:
59+
os: [ubuntu-latest, windows-latest]
60+
python: ['3.7', '3.8', '3.9', '3.10', '3.11']
61+
62+
steps:
63+
- name: Checkout
64+
uses: actions/checkout@v3
65+
66+
- name: Checkout Pygls
67+
uses: actions/checkout@v3
68+
with:
69+
repository: openlawlibrary/pygls
70+
path: smoke_tests
71+
72+
- name: Use Python ${{ matrix.python }}
73+
uses: actions/setup-python@v4
74+
with:
75+
python-version: ${{ matrix.python }}
76+
77+
- name: Update pip, install wheel
78+
run: python -m pip install -U pip wheel
79+
shell: bash
80+
81+
- name: Install pip pygls dependencies
82+
run: python -m pip install typeguard mock pytest pytest-asyncio
83+
shell: bash
84+
85+
- name: Install pip lsprotocol dependencies
86+
run: python -m pip install -r ./packages/python/requirements.txt
87+
shell: bash
88+
89+
- name: Pip List
90+
run: python -m pip list
91+
shell: bash
92+
93+
- name: Run Tests
94+
run: python -m pytest smoke_tests/tests
95+
env:
96+
PYTHONPATH: ./packages/python
97+
shell: bash

.prettierrc.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module.exports = {
2+
singleQuote: true,
3+
printWidth: 120,
4+
tabWidth: 4,
5+
endOfLine: 'auto',
6+
trailingComma: 'all',
7+
overrides: [
8+
{
9+
files: ['*.yml', '*.yaml'],
10+
options: {
11+
tabWidth: 2
12+
}
13+
}
14+
]
15+
};

.vscode/extensions.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"recommendations": [
3+
"esbenp.prettier-vscode",
4+
"ms-python.python",
5+
"ms-python.vscode-pylance",
6+
"ms-python.black-formatter",
7+
"ms-python.isort"
8+
]
9+
}

0 commit comments

Comments
 (0)