Skip to content

Commit 0d66e28

Browse files
authored
refactor: use crate from deno repo (#100)
1 parent 21c5947 commit 0d66e28

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+534
-6630
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -3,56 +3,23 @@ name: ci
33
on: [push, pull_request]
44

55
jobs:
6-
rust:
7-
name: deno_cache_dir-${{ matrix.os }}
8-
if: |
9-
github.event_name == 'push' ||
10-
!startsWith(github.event.pull_request.head.label, 'denoland:')
6+
deno:
7+
name: deno_cache_dir ${{ matrix.os }}
118
runs-on: ${{ matrix.os }}
129
timeout-minutes: 30
1310
strategy:
1411
matrix:
1512
os: [macOS-latest, ubuntu-latest, windows-latest]
16-
17-
steps:
18-
- name: Clone repository
19-
uses: actions/checkout@v5
20-
21-
- name: Install rust
22-
uses: dsherret/rust-toolchain-file@v1
23-
24-
- uses: Swatinem/rust-cache@v2
25-
with:
26-
save-if: ${{ github.ref == 'refs/heads/main' }}
27-
28-
- name: Format
29-
if: contains(matrix.os, 'ubuntu')
30-
run: cargo fmt --check
31-
32-
- name: Clippy
33-
if: contains(matrix.os, 'ubuntu')
34-
run: cargo clippy
35-
36-
- name: Build (sync)
37-
run: cargo build --features sync
38-
39-
- name: Test
40-
run: cargo test
41-
42-
deno:
43-
name: deno_cache_dir-deno
4413
if: |
4514
github.event_name == 'push' ||
4615
!startsWith(github.event.pull_request.head.label, 'denoland:')
47-
runs-on: ubuntu-latest
4816
permissions:
4917
contents: read
5018
id-token: write
51-
timeout-minutes: 30
5219

5320
steps:
5421
- name: Clone repository
55-
uses: actions/checkout@v5
22+
uses: actions/checkout@v6
5623
- name: Install rust
5724
uses: dsherret/rust-toolchain-file@v1
5825
- uses: Swatinem/rust-cache@v2
@@ -62,15 +29,20 @@ jobs:
6229
uses: denoland/setup-deno@v2
6330
with:
6431
deno-version: canary
32+
- name: Install wasm32-unknown-unknown
33+
run: rustup target add wasm32-unknown-unknown
6534

6635
- name: Format
67-
run: deno fmt --check
36+
if: contains(matrix.os, 'ubuntu')
37+
run: cargo fmt --check && deno fmt --check
38+
- name: Clippy
39+
if: contains(matrix.os, 'ubuntu')
40+
run: cargo clippy --target=wasm32-unknown-unknown && deno lint
6841
- name: Build
6942
run: deno task build
70-
- name: Lint
71-
run: deno lint
7243
- name: Test
7344
run: deno task test
7445

7546
- name: Publish JSR
47+
if: contains(matrix.os, 'ubuntu')
7648
run: deno run -A jsr:@david/publish-on-tag@0.1.3

.github/workflows/publish.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ jobs:
2020

2121
steps:
2222
- name: Clone repository
23-
uses: actions/checkout@v5
23+
uses: actions/checkout@v6
2424
with:
2525
token: ${{ secrets.DENOBOT_PAT }}
2626

27-
- uses: denoland/setup-deno@v1
27+
- uses: denoland/setup-deno@v2
2828
with:
2929
deno-version: canary
3030
- uses: dsherret/rust-toolchain-file@v1

.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
.vscode
22
/target
3-
lib/snippets
4-
lib/deno_cache_dir.generated.js
5-
lib/deno_cache_dir.generated.d.ts
3+
lib/

0 commit comments

Comments
 (0)