This commit is contained in:
Quinn Dougherty 2022-06-20 11:52:54 -04:00
parent 7e6dbf260f
commit 358769a179
2 changed files with 38 additions and 1 deletions

View File

@ -19,6 +19,7 @@ jobs:
should_skip_lang: ${{ steps.skip_lang_check.outputs.should_skip }} should_skip_lang: ${{ steps.skip_lang_check.outputs.should_skip }}
should_skip_components: ${{ steps.skip_components_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_website: ${{ steps.skip_website_check.outputs.should_skip }}
should_skip_vscodeext: ${{ steps.skip_vscodeext_check.outputs.should_skip }}
steps: steps:
- id: skip_lang_check - id: skip_lang_check
name: Check if the changes are about squiggle-lang src files name: Check if the changes are about squiggle-lang src files
@ -35,6 +36,11 @@ jobs:
uses: fkirc/skip-duplicate-actions@v3.4.1 uses: fkirc/skip-duplicate-actions@v3.4.1
with: with:
paths: '["packages/website/**"]' 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: lang-lint:
name: Language lint name: Language lint
@ -158,3 +164,33 @@ jobs:
run: cd ../components && yarn build run: cd ../components && yarn build
- name: Build website assets - name: Build website assets
run: yarn build 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

View File

@ -43,7 +43,8 @@
"compile": "yarn run compile:tsc && yarn run compile:vendor", "compile": "yarn run compile:tsc && yarn run compile:vendor",
"watch": "tsc -watch -p ./", "watch": "tsc -watch -p ./",
"pretest": "yarn run compile && yarn run lint", "pretest": "yarn run compile && yarn run lint",
"lint": "eslint src --ext ts" "lint": "eslint src --ext ts",
"format": "eslint src --ext ts --fix"
}, },
"devDependencies": { "devDependencies": {
"@types/vscode": "^1.68.0", "@types/vscode": "^1.68.0",