Skip to content

Commit

Permalink
feat: tasks and ci (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
eliassjogreen authored Aug 14, 2023
1 parent a82cafa commit 2aba8b7
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 7 deletions.
17 changes: 16 additions & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,21 @@ jobs:
- name: Run deno lint
run: deno lint --unstable

check:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Setup latest deno version
uses: denoland/setup-deno@v1
with:
deno-version: v1.x

- name: Run deno task check
run: deno task check


test:
name: test ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand All @@ -49,4 +64,4 @@ jobs:
run: python3 -m pip install numpy

- name: Run deno test
run: deno test --allow-all --unstable
run: deno task test
13 changes: 9 additions & 4 deletions deno.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
{
"tasks": {
"check": "deno task check:mod && deno task check:ext && deno task check:examples",
"check:mod": "deno check --unstable mod.ts",
"check:ext": "deno check --unstable ext/*.ts",
"check:examples": "deno check --unstable examples/*.ts",
"test": "deno test --unstable -A test/test.ts",
"example_hello_python": "deno run -A --unstable examples/hello_python.ts",
"example_matplotlib": "deno run -A --unstable examples/matplotlib.ts",
"example_run_code": "deno run -A --unstable examples/run_code.ts",
"example_tensorflow": "deno run -A --unstable examples/tensorflow.ts"
"example:hello_python": "deno run -A --unstable examples/hello_python.ts",
"example:matplotlib": "deno run -A --unstable examples/matplotlib.ts",
"example:pip_import": "deno run -A --unstable examples/pip_import.ts",
"example:run_code": "deno run -A --unstable examples/run_code.ts",
"example:tensorflow": "deno run -A --unstable examples/tensorflow.ts"
}
}
2 changes: 1 addition & 1 deletion ext/pip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function getModuleNameAndVersion(module: string): {
export class Pip {
#cacheLocation: Promise<string>;

constructor(location: CacheLocation) {
constructor(location?: CacheLocation) {
this.#cacheLocation = Promise.all([
ensureCacheLocation(location),
globalThis.location !== undefined
Expand Down
2 changes: 1 addition & 1 deletion test/deps.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "https://deno.land/[email protected]/testing/asserts.ts";
export * from "https://deno.land/[email protected]/assert/mod.ts";

0 comments on commit 2aba8b7

Please sign in to comment.