Skip to content

Commit

Permalink
Restore lint yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Kartik Raj committed May 4, 2023
1 parent c249a96 commit 0697223
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 18 deletions.
49 changes: 49 additions & 0 deletions .github/actions/lint/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: 'Lint'
description: 'Lint TypeScript and Python code'

inputs:
node_version:
description: 'Version of Node to install'
required: true

runs:
using: 'composite'
steps:
- name: Install Node
uses: actions/setup-node@v2
with:
node-version: ${{ inputs.node_version }}
cache: 'npm'

- name: Install Node dependencies
run: npm ci --prefer-offline
shell: bash

- name: Run `gulp prePublishNonBundle`
run: npx gulp prePublishNonBundle
shell: bash

- name: Check dependencies
run: npm run checkDependencies
shell: bash

- name: Lint TypeScript code
run: npm run lint
shell: bash

- name: Check TypeScript format
run: npm run format-check
shell: bash

- name: Install Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
cache: 'pip'

- name: Check Python format
run: |
python -m pip install -U black
python -m black . --check
working-directory: pythonFiles
shell: bash
12 changes: 3 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,11 @@ jobs:
if: github.repository == 'microsoft/vscode-python'
runs-on: ubuntu-latest
steps:
- name: Checkout Actions
uses: actions/checkout@v3
with:
repository: 'microsoft/vscode-python-engineering'
path: ./actions
- name: Install Actions
run: npm install --production --prefix ./actions
- name: Checkout Actions
- name: Checkout
uses: actions/checkout@v3

- name: Lint
uses: ./actions/lint
uses: ./.github/actions/lint
with:
node_version: ${{ env.NODE_VERSION }}

Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,11 @@ jobs:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout Actions
uses: actions/checkout@v3
with:
repository: 'microsoft/vscode-python-engineering'
path: ./actions
- name: Install Actions
run: npm install --production --prefix ./actions
- name: Checkout Actions
- name: Checkout
uses: actions/checkout@v3

- name: Lint
uses: ./actions/lint
uses: ./.github/actions/lint
with:
node_version: ${{ env.NODE_VERSION }}

Expand Down

0 comments on commit 0697223

Please sign in to comment.