Skip to content

Commit

Permalink
test: add real-package tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mtshiba committed Sep 2, 2024
1 parent e899546 commit 75364cd
Show file tree
Hide file tree
Showing 6 changed files with 103 additions and 14 deletions.
1 change: 0 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ jobs:

steps:
- uses: actions/checkout@v2
# installing pylyzer itself is required for the tests
- name: Build
run: |
rustup update stable
Expand Down
72 changes: 72 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Test

on:
push:
branches: [main]
paths-ignore:
- "docs/**"
- "images/**"
- "**.md"
- "**.yml"
- "LICENSE-**"
- ".gitmessage"
- ".pre-commit-config.yaml"
pull_request:
branches: [main]
paths-ignore:
- "docs/**"
- "images/**"
- "**.md"
- "**.yml"
- "LICENSE-**"
- ".pre-commit-config.yaml"

env:
CARGO_TERM_COLOR: always

jobs:
package-test:
runs-on: macos-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
- name: Install
run: |
rustup update stable
cargo install --path .
- name: boto3
run: |
pip3 install boto3
pylyzer -c "import boto3"
echo "OK: boto3"
- name: urllib3
run: |
pip3 install urllib3
pylyzer -c "import urllib3"
echo "OK: urllib3"
- name: setuptools
run: |
pip3 install setuptools
pylyzer -c "import setuptools"
echo "OK: setuptools"
- name: requests
run: |
pip3 install requests
pylyzer -c "import requests"
echo "OK: requests"
- name: certifi
run: |
pip3 install certifi
pylyzer -c "import certifi"
echo "OK: certifi"
- name: charset-normalizer
run: |
pip3 install charset-normalizer
pylyzer -c "import charset_normalizer"
echo "OK: charset-normalizer"
- name: idna
run: |
pip3 install idna
pylyzer -c "import idna"
echo "OK: idna"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/target
__pycache__/
test*.py
/site
20 changes: 10 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ edition = "2021"
repository = "https://github.com/mtshiba/pylyzer"

[workspace.dependencies]
erg_common = { version = "0.6.42-nightly.5", features = ["py_compat", "els"] }
erg_compiler = { version = "0.6.42-nightly.5", features = ["py_compat", "els"] }
els = { version = "0.1.54-nightly.5", features = ["py_compat"] }
erg_common = { version = "0.6.43-nightly.1", features = ["py_compat", "els"] }
erg_compiler = { version = "0.6.43-nightly.1", features = ["py_compat", "els"] }
els = { version = "0.1.55-nightly.1", features = ["py_compat"] }
# rustpython-parser = { version = "0.3.0", features = ["all-nodes-with-ranges", "location"] }
# rustpython-ast = { version = "0.3.0", features = ["all-nodes-with-ranges", "location"] }
rustpython-parser = { git = "https://github.com/RustPython/Parser", version = "0.4.0", features = ["all-nodes-with-ranges", "location"] }
Expand Down
17 changes: 17 additions & 0 deletions docs/options/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,20 @@ $ pylyzer -c "print('hello world')"
Start checking: string
All checks OK: string
```

## --disable

Disable a default LSP feature.
Default (disableable) features are:

* codeAction
* codeLens
* completion
* diagnostics
* findReferences
* gotoDefinition
* hover
* inlayHint
* rename
* semanticTokens
* signatureHelp

0 comments on commit 75364cd

Please sign in to comment.