8000 feat: tasks and ci (#45) · denosaurs/deno_python@2aba8b7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2aba8b7

Browse files
feat: tasks and ci (#45)
1 parent a82cafa commit 2aba8b7

File tree

4 files changed

+27
-7
lines changed

4 files changed

+27
-7
lines changed

.github/workflows/checks.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,21 @@ jobs:
2424
- name: Run deno lint
2525
run: deno lint --unstable
2626

27+
check:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Checkout sources
31+
uses: actions/checkout@v2
32+
33+
- name: Setup latest deno version
34+
uses: denoland/setup-deno@v1
35+
with:
36+
deno-version: v1.x
37+
38+
- name: Run deno task check
39+
run: deno task check
40+
41+
2742
test:
2843
name: test ${{ matrix.os }}
2944
runs-on: ${{ matrix.os }}
@@ -49,4 +64,4 @@ jobs:
4964
run: python3 -m pip install numpy
5065

5166
- name: Run deno test
52-
run: deno test --allow-all --unstable
67+
run: deno task test

deno.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
{
22
"tasks": {
3+
"check": "deno task check:mod && deno task check:ext && deno task check:examples",
4+
"check:mod": "deno check --unstable mod.ts",
5+
"check:ext": "deno check --unstable ext/*.ts",
6+
"check:examples": "deno check --unstable examples/*.ts",
37
"test": "deno test --unstable -A test/test.ts",
4-
"example_hello_python": "deno run -A --unstable examples/hello_python.ts",
5-
"example_matplotlib": "deno run -A --unstable examples/matplotlib.ts",
6-
"example_run_code": "deno run -A --unstable examples/run_code.ts",
7-
"example_tensorflow": "deno run -A --unstable examples/tensorflow.ts"
8+
"example:hello_python": "deno run -A --unstable examples/hello_python.ts",
9+
"example:matplotlib": "deno run -A --unstable examples/matplotlib.ts",
10+
"example:pip_import": "deno run -A --unstable examples/pip_import.ts",
11+
"example:run_code": "deno run -A --unstable examples/run_code.ts",
12+
"example:tensorflow": "deno run -A --unstable examples/tensorflow.ts"
813
}
914
}

ext/pip.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function getModuleNameAndVersion(module: string): {
4141
export class Pip {
4242
#cacheLocation: Promise<string>;
4343

44-
constructor(location: CacheLocation) {
44+
constructor(location?: CacheLocation) {
4545
this.#cacheLocation = Promise.all([
4646
ensureCacheLocation(location),
4747
globalThis.location !== undefined

test/deps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * from "https://deno.land/std@0.198.0/testing/asserts.ts";
1+
export * from "https://deno.land/std@0.198.0/assert/mod.ts";

0 commit comments

Comments
 (0)
0