[Dev] Update dependency eslint-plugin-unused-imports to v3 #626
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: | |
branches: [main] | |
pull_request: | |
types: [opened, synchronize, reopened, ready_for_review] | |
branches: [main] | |
permissions: | |
contents: read | |
jobs: | |
build-and-test: | |
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && !github.event.pull_request.draft && !startsWith(github.event.pull_request.title, 'WIP ')) }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
clean: true | |
lfs: true | |
submodules: true | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version-file: "pyproject.toml" | |
cache: "pip" | |
- name: Install poetry | |
uses: abatilo/actions-poetry@v2 | |
- name: Set up local venv | |
run: | | |
poetry config virtualenvs.create true --local | |
poetry config virtualenvs.in-project true --local | |
- name: Cache venv | |
uses: actions/cache@v3 | |
with: | |
path: ./.venv | |
key: venv-${{ hashFiles('poetry.lock') }} | |
- run: poetry install | |
- run: poetry run black --check . | |
- run: poetry run pylint salt2type | |
- name: Set up Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: "tpl/.nvmrc" | |
cache: "npm" | |
cache-dependency-path: "tpl/package-lock.json" | |
- run: npm install | |
working-directory: tpl | |
- run: npx prettier --check .. | |
working-directory: tpl | |
- run: npm run lint | |
working-directory: tpl | |
- run: npm run typecheck | |
working-directory: tpl | |
- run: npm run build | |
working-directory: tpl | |
- run: npm run test | |
working-directory: tpl |