diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 94e5c796..607582b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,7 @@ jobs: should_skip_lang: ${{ steps.skip_lang_check.outputs.should_skip }} should_skip_components: ${{ steps.skip_components_check.outputs.should_skip }} should_skip_website: ${{ steps.skip_website_check.outputs.should_skip }} + should_skip_vscodeext: ${{ steps.skip_vscodeext_check.outputs.should_skip }} steps: - id: skip_lang_check name: Check if the changes are about squiggle-lang src files @@ -35,6 +36,11 @@ jobs: uses: fkirc/skip-duplicate-actions@v3.4.1 with: paths: '["packages/website/**"]' + - id: skip_vscodeext_check + name: Check if the changes are about vscode extension src files + uses: fkirc/skip-duplicate-actions@v3.4.1 + with: + paths: '["packages/vscode-ext/**"]' lang-lint: name: Language lint @@ -158,3 +164,33 @@ jobs: run: cd ../components && yarn build - name: Build website assets run: yarn build + + vscode-ext-lint: + name: VSCode Extension lint + runs-on: ubuntu-latest + needs: pre_check + if: ${{ needs.pre_check.outputs.should_skip_vscodeext != 'true' }} + defaults: + run: + shell: bash + working-directory: packages/vscode-ext + steps: + - uses: actions/checkout@v2 + - name: Lint the VSCode Extension source code + run: yarn lint + + vscode-ext-build: + name: VSCode Extension build + runs-on: ubuntu-latest + needs: pre_check + if: ${{ (needs.pre_check.outputs.should_skip_components != 'true') || (needs.pre_check.outputs.should_skip_lang != 'true') }} || (needs.pre_check.outputs.should_skip_vscodeext != 'true') }} + defaults: + run: + shell: bash + working-directory: packages/vscode-ext + steps: + - uses: actions/checkout@v2 + - name: Install dependencies from monorepo level + run: cd ../../ && yarn + - name: Build + run: yarn compile diff --git a/packages/vscode-ext/package.json b/packages/vscode-ext/package.json index efb4b226..58df905d 100644 --- a/packages/vscode-ext/package.json +++ b/packages/vscode-ext/package.json @@ -43,7 +43,8 @@ "compile": "yarn run compile:tsc && yarn run compile:vendor", "watch": "tsc -watch -p ./", "pretest": "yarn run compile && yarn run lint", - "lint": "eslint src --ext ts" + "lint": "eslint src --ext ts", + "format": "eslint src --ext ts --fix" }, "devDependencies": { "@types/vscode": "^1.68.0",