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 6dc6705
Show file tree
Hide file tree
Showing 5 changed files with 101 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
71 changes: 71 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
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
- 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"
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 6dc6705

Please sign in to comment.