-
Notifications
You must be signed in to change notification settings - Fork 45
59 lines (45 loc) · 1.23 KB
/
ci.yml
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
name: ci
on:
push:
branches: [main]
tags: "*"
pull_request:
branches: [main]
jobs:
test:
name: test-${{ matrix.os }}-${{ matrix.deno }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
# Test on the latest stable, and canary
deno: [v1.x, canary]
os: [macOS-latest, windows-latest, ubuntu-latest]
permissions:
contents: read
id-token: write
steps:
- name: Setup repo
uses: actions/checkout@v4
- name: Setup Deno
uses: denoland/setup-deno@main
with:
deno-version: "1.x"
- name: Install Rust
uses: dsherret/rust-toolchain-file@v1
- run: deno --version
- name: Format
if: runner.os == 'Linux'
run: deno fmt --check
- name: Build Wasm
run: deno task wasmbuild
- name: Lint
if: runner.os == 'Linux'
run: deno lint
- name: Run tests
run: deno test -A
- name: Dry run publishing
if: runner.os == 'Linux' && matrix.deno == 'canary'
run: deno publish --dry-run
- name: Publish (on tag)
if: runner.os == 'Linux' && startsWith(github.ref, 'refs/tags/') && matrix.deno == 'canary'
run: deno publish