forked from denoland/dnt
-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (62 loc) · 1.71 KB
/
ci.yml
File metadata and controls
66 lines (62 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
tags:
- "*"
concurrency:
group: ${{ github.workflow }}-${{ !contains(github.event.pull_request.labels.*.name, 'test-flaky-ci') && github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: dsherret/rust-toolchain-file@v1
- uses: Swatinem/rust-cache@v2
- uses: denoland/setup-deno@v2
with:
deno-version: 2.x
- uses: actions/setup-node@v4
with:
node-version: "20"
registry-url: "https://registry.npmjs.org"
- name: Format
if: matrix.os == 'ubuntu-latest'
run: |
cargo fmt --all -- --check
deno fmt --check
- name: Lint (Cargo)
if: matrix.os == 'ubuntu-latest'
run: cargo clippy --all-targets --all-features --release
- name: Build
run: deno task build
- name: Lint (Deno)
run: deno lint
- name: Test (Rust)
run: cargo test --all-targets --all-features --release
- name: Test (Deno)
run: deno task test
jsr:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: dsherret/rust-toolchain-file@v1
- uses: Swatinem/rust-cache@v2
- uses: denoland/setup-deno@v2
with:
deno-version: 2.x
- name: Build
run: deno task build
- name: Publish on tag
run: deno run -A jsr:@david/publish-on-tag@0.2.0