From acd89be8939a737ae73fa319c46c94bc90e471f7 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Wed, 3 May 2023 16:52:51 -0700 Subject: [PATCH] Use lint from separate repo --- .github/actions/lint/action.yml | 49 --------------------------------- .github/workflows/build.yml | 10 +++++-- .github/workflows/pr-check.yml | 10 +++++-- 3 files changed, 14 insertions(+), 55 deletions(-) delete mode 100644 .github/actions/lint/action.yml diff --git a/.github/actions/lint/action.yml b/.github/actions/lint/action.yml deleted file mode 100644 index 9478550c107b..000000000000 --- a/.github/actions/lint/action.yml +++ /dev/null @@ -1,49 +0,0 @@ -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 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 805077ffdb46..7c15296d8cb7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -63,11 +63,15 @@ jobs: if: github.repository == 'microsoft/vscode-python' runs-on: ubuntu-latest steps: - - name: Checkout + - 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: Lint - uses: ./.github/actions/lint + uses: ./actions/lint with: node_version: ${{ env.NODE_VERSION }} diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 2ac560af995d..d1b6bc147f52 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -38,11 +38,15 @@ jobs: name: Lint runs-on: ubuntu-latest steps: - - name: Checkout + - 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: Lint - uses: ./.github/actions/lint + uses: ./actions/lint with: node_version: ${{ env.NODE_VERSION }}