Skip to content

Commit

Permalink
ci: Use deno task (#297)
Browse files Browse the repository at this point in the history
  • Loading branch information
uki00a authored Mar 21, 2022
1 parent 5ddd5e3 commit bbeae18
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ jobs:

- name: Check mod.ts
run: |
deno run --allow-read --allow-write --allow-run tools/make_mod.ts
deno task make_mod
git diff --exit-code
deno cache mod.ts # Ensure that mod.ts works without --unstable
- name: Run lint
run: |
deno fmt --check --ignore=./benchmark/node_modules
deno lint --ignore=./benchmark/node_modules
deno fmt --check
deno lint
- name: Set up Redis ${{ matrix.redis }}
uses: shogo82148/actions-setup-redis@v1
Expand All @@ -51,11 +51,10 @@ jobs:

- name: Run tests
run: |
deno test --allow-net --allow-read=tests --allow-write=tests/tmp --allow-run=redis-server,redis-cli ./tests
deno task test
- name: Run doc tests
run: |
deno test --doc --no-run --import-map=import_map.test.json
deno task test:doc
- uses: bahmutov/npm-install@v1
with:
working-directory: benchmark
Expand Down
21 changes: 21 additions & 0 deletions deno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"fmt": {
"files": {
"exclude": [
"benchmark/node_modules"
]
}
},
"lint": {
"files": {
"exclude": [
"benchmark/node_modules"
]
}
},
"tasks": {
"test": "deno test --allow-net --allow-read=tests --allow-write=tests/tmp --allow-run=redis-server,redis-cli ./tests",
"test:doc": "deno test --doc --no-run --import-map=import_map.test.json",
"make_mod": "deno run --allow-read --allow-write --allow-run tools/make_mod.ts"
}
}

0 comments on commit bbeae18

Please sign in to comment.