Skip to content

Commit

Permalink
feat(vscode-plugin): use test-vscode in precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
mcecode committed Sep 20, 2024
1 parent 4c1c506 commit 54c86ef
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Precommit

on:
push:
branches: [ "master" ]
branches: [ "master", "vscode-bundle-harper-ls" ]
pull_request:
branches: [ "master" ]

Expand Down
31 changes: 23 additions & 8 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,21 @@ build-obsidian:

zip harper-obsidian-plugin.zip manifest.json main.js

# This assumes that `harper-ls` has been compiled and is located at `target/release`.
test-vscode:
#! /bin/bash
set -eo pipefail

ext_dir="{{justfile_directory()}}/packages/vscode-plugin"
bin_dir="${ext_dir}/bin"

mkdir "$bin_dir"
cp "{{justfile_directory()}}/target/release/harper-ls"* "$bin_dir"
cd "$ext_dir"

yarn install -f
yarn test

# This assumes that `harper-ls` or `harper-ls.exe` exists in `packages/vscode-plugin/bin`.
package-vscode target:
#! /bin/bash
Expand Down Expand Up @@ -71,17 +86,17 @@ precommit:
#! /bin/bash
set -eo pipefail

just check
just test
# just check
# just test

cargo doc
cargo build
# cargo doc
# cargo build
cargo build --release
cargo bench
# cargo bench

just build-obsidian
just package-vscode
just build-web
# just build-obsidian
just test-vscode
# just build-web

install:
cargo install --path harper-ls
Expand Down

0 comments on commit 54c86ef

Please sign in to comment.