Skip to content

Commit

Permalink
Don't run typeshare if it is not installed
Browse files Browse the repository at this point in the history
This is done since right now installing typeshare-cli take 5 minutes out
of 15 minutes in CI.
  • Loading branch information
oeb25 committed Feb 13, 2023
1 parent f2ecc53 commit a0fe804
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:

- uses: taiki-e/install-action@v2
with:
tool: just,typeshare-cli
tool: just

- uses: jetli/wasm-pack-action@v0.4.0
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ on:
- v[0-9]+.*

env:
ALL_CARGO_DIST_TARGET_ARGS: --target=x86_64-unknown-linux-gnu --target=x86_64-apple-darwin --target=x86_64-pc-windows-msvc
ALL_CARGO_DIST_INSTALLER_ARGS: --installer=github-shell --installer=github-powershell
ALL_CARGO_DIST_TARGET_ARGS: --target=x86_64-unknown-linux-gnu --target=x86_64-apple-darwin --target=x86_64-pc-windows-msvc
ALL_CARGO_DIST_INSTALLER_ARGS: --installer=github-shell --installer=github-powershell

jobs:
# Create the Github Release™️ so the packages have something to be uploaded to
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
- name: Install just and typeshare
uses: taiki-e/install-action@v2
with:
tool: just,typeshare-cli
tool: just
- name: Install wasm-pack
uses: jetli/wasm-pack-action@v0.4.0
with:
Expand Down
8 changes: 7 additions & 1 deletion Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ watch-web:
cd inspectify/ui; npm run dev

typeshare:
typeshare . --lang=typescript --output-file=./inspectify/ui/src/lib/types.ts
#!/bin/bash
set -e
if which typeshare > /dev/null ; then
typeshare . --lang=typescript --output-file=./inspectify/ui/src/lib/types.ts
else
echo "typeshare not run. to run install with 'cargo binstall typeshare-cli'"
fi

build-wasm:
cd inspectify/wasm; wasm-pack build --release --target bundler
Expand Down
6 changes: 0 additions & 6 deletions inspectify/ui/src/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@

export type Markdown = string;

export interface Sample {
input_json: unknown;
input_markdown: Markdown;
output_markdown: Markdown;
}

export interface AnalysisRequest {
analysis: Analysis;
src: string;
Expand Down
2 changes: 1 addition & 1 deletion xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async fn run() -> Result<()> {
- name: Install just and typeshare
uses: taiki-e/install-action@v2
with:
tool: just,typeshare-cli
tool: just
- name: Install wasm-pack
uses: jetli/wasm-pack-action@v0.4.0
with:
Expand Down

0 comments on commit a0fe804

Please sign in to comment.