From 3d46737a69235fe46d9ff6a1dd095e0ec9412c72 Mon Sep 17 00:00:00 2001 From: Jordan Jensen Date: Wed, 20 Mar 2024 16:02:41 -0700 Subject: [PATCH 1/3] Split install deps from just vscode configure --- extensions/vscode/justfile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/extensions/vscode/justfile b/extensions/vscode/justfile index d0c9a1b86d..7b798a8442 100644 --- a/extensions/vscode/justfile +++ b/extensions/vscode/justfile @@ -57,16 +57,26 @@ clean: rm -rf node_modules rm -rf out -configure os="$(just ../../os)" arch="$(just ../../arch)": +# Install dependencies +deps: #!/usr/bin/env bash set -eou pipefail {{ _with_debug }} + if [ {{ _ci }} = "true" ]; then npm ci --no-audit --no-fund | sed 's/^/debug: /' else npm install --no-audit --no-fund | sed 's/^/debug: /' fi + +configure os="$(just ../../os)" arch="$(just ../../arch)": + #!/usr/bin/env bash + set -eou pipefail + {{ _with_debug }} + + just deps + echo "info: checking for compatible binary executable..." 1>&2 binary_executable=$(just ../../executable-path {{ os }} {{ arch }}) if ! [ -f "$binary_executable" ]; then From a1550ae3bef8dc3238e673cffda530df4c4632f8 Mon Sep 17 00:00:00 2001 From: Jordan Jensen Date: Wed, 20 Mar 2024 16:03:07 -0700 Subject: [PATCH 2/3] Remove lint and check-format from vscode workflow --- .github/workflows/vscode.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/vscode.yaml b/.github/workflows/vscode.yaml index e9f9eb3997..c3451022b2 100644 --- a/.github/workflows/vscode.yaml +++ b/.github/workflows/vscode.yaml @@ -29,8 +29,6 @@ jobs: path: ./extensions/vscode/.vscode-test/vscode-* key: ${{ matrix.runner }}-vscode-${{ env.VSCODE_VERSION }}-${{ steps.get-date.outputs.date }} - run: just vscode configure - - run: just vscode lint - - run: just vscode check-format - run: just vscode test - uses: actions/cache/save@v3 if: steps.cache.outputs.cache-hit != 'true' @@ -53,8 +51,6 @@ jobs: path: ./extensions/vscode/.vscode-test/vscode-* key: docker-vscode-${{ env.VSCODE_VERSION }}-${{ steps.get-date.outputs.date }} - run: just vscode configure - - run: just vscode lint - - run: just vscode check-format - run: just vscode test - uses: actions/cache/save@v3 if: steps.cache.outputs.cache-hit != 'true' From 1e6d9a043f81dbbe687ed9d1ba4c087dd3a86c07 Mon Sep 17 00:00:00 2001 From: Jordan Jensen Date: Wed, 20 Mar 2024 16:03:27 -0700 Subject: [PATCH 3/3] Create lint github workflow --- .github/workflows/lint.yaml | 18 ++++++++++++++++++ .github/workflows/pull-request.yaml | 4 ++++ 2 files changed, 22 insertions(+) create mode 100644 .github/workflows/lint.yaml diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 0000000000..8df235a1b8 --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,18 @@ +name: Lint +on: [workflow_call] +env: + DOCKER: false +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: extractions/setup-just@v2 + - uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + cache-dependency-path: '**/package-lock.json' + - run: just vscode deps + - run: just vscode lint + - run: just vscode check-format diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml index 8bf5c6f8af..13928ec6aa 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yaml @@ -6,6 +6,10 @@ concurrency: group: ${{ github.head_ref }} cancel-in-progress: true jobs: + # Linting and formatting + lint: + uses: ./.github/workflows/lint.yaml + # Unit Tests agent: uses: ./.github/workflows/agent.yaml