If using sema4ai-actions 0.7.0
or newer, the results of running an …
#3061
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint | |
on: | |
- push | |
- pull_request | |
jobs: | |
run-linters: | |
name: Run linters | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v2 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install pip deps | |
run: | | |
python -m pip install --upgrade pip fire poetry | |
python -m venv .venv | |
source ./.venv/bin/activate | |
cd robocorp-code | |
poetry config virtualenvs.prefer-active-python true | |
poetry install | |
poetry run python -m pip install robotframework-output-stream | |
cd .. | |
echo $PWD/robotframework-ls/src > .venv/lib/python3.10/site-packages/rf_src.pth | |
echo $PWD/robocorp-code/src >> .venv/lib/python3.10/site-packages/rf_src.pth | |
echo $PWD/robocorp-python-ls-core/src >> .venv/lib/python3.10/site-packages/rf_src.pth | |
echo $PWD/robotframework-ls/tests >> .venv/lib/python3.10/site-packages/rf_src.pth | |
echo $PWD/robocorp-code/tests >> .venv/lib/python3.10/site-packages/rf_src.pth | |
echo $PWD/robocorp-python-ls-core/tests >> .venv/lib/python3.10/site-packages/rf_src.pth | |
- name: Install prettier | |
run: | | |
npm install -g prettier@2.4.1 | |
- name: TS Format Robot Framework LS (yarn prettier --write vscode-client/**/*.ts to format files locally) | |
working-directory: ./robotframework-ls/ | |
run: prettier --check vscode-client/**/*.ts | |
- name: Prettier Robocorp Code (yarn prettier --write vscode-client/**/*.ts to format files locally) | |
working-directory: ./robocorp-code | |
run: prettier --check vscode-client/**/*.ts | |
- name: Prettier RF Interactive (yarn prettier --write src/**/*.{ts,tsx} to format files locally) | |
working-directory: ./robotframework-interactive/vscode-interpreter-webview | |
run: prettier --check src/**/*.{ts,tsx} | |
- name: ruff format check robocorp-code | |
run: | | |
echo $PWD | |
ls -la | |
source ./.venv/bin/activate | |
ruff format --check ./robocorp-code --exclude=vendored --exclude=_vendored | |
- name: ruff format check robotframework-ls | |
run: | | |
source ./.venv/bin/activate | |
ruff format --check ./robotframework-ls --exclude=vendored --exclude=atest_v5 | |
- name: ruff format check robotframework-interactive | |
run: | | |
source ./.venv/bin/activate | |
ruff format --check ./robotframework-interactive --exclude=vendored | |
- name: ruff format check robocorp-python-ls-core | |
run: | | |
source ./.venv/bin/activate | |
ruff format --check ./robocorp-python-ls-core --exclude=vendored --exclude=libs | |
- name: mypy robocorp-code | |
run: | | |
source ./.venv/bin/activate | |
mypy --follow-imports=silent --show-column-numbers $PWD/robocorp-code/src $PWD/robocorp-code/tests $PWD/robocorp-code/codegen | |
- name: mypy robocorp-python-ls-core | |
run: | | |
source ./.venv/bin/activate | |
mypy --follow-imports=silent --show-column-numbers $PWD/robocorp-python-ls-core/src $PWD/robocorp-python-ls-core/tests | |
- name: mypy robotframework-ls | |
run: | | |
source ./.venv/bin/activate | |
mypy --follow-imports=silent --show-column-numbers $PWD/robotframework-ls/src $PWD/robotframework-ls/tests | |
- name: mypy robotframework-interactive | |
run: | | |
source ./.venv/bin/activate | |
mypy --follow-imports=silent --show-column-numbers $PWD/robotframework-interactive/src $PWD/robotframework-interactive/tests | |