-
Notifications
You must be signed in to change notification settings - Fork 57
58 lines (47 loc) · 1.93 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
name: ci
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
name: test-${{ matrix.os }}-${{ matrix.deno }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
# Test on the oldest supported, the latest stable, and nightly
deno: [old, stable, canary]
os: [macOS-latest, windows-latest, ubuntu-latest]
steps:
- name: Setup repo
uses: actions/checkout@v3
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
# Make sure to keep this in sync with the one defined in version.ts.
# Also don't forget to update README.md.
deno-version: ${{ matrix.deno == 'old' && '1.46.0' || (matrix.deno == 'stable' && '2.x' || matrix.deno) }}
- run: deno --version
- name: Format
if: runner.os == 'Linux' && matrix.deno == 'stable'
run: deno fmt --check
- name: Lint
if: runner.os == 'Linux' && matrix.deno == 'stable'
run: deno lint
- name: Typecheck
if: runner.os == 'Linux' && matrix.deno == 'stable'
run: deno check deployctl.ts
# Skip temporarily (see https://github.com/denoland/deployctl/actions/runs/11500790181/job/32011870448?pr=342#step:8:148)
# - name: action/deps.js up-to-date
# if: runner.os == 'Linux' && matrix.deno == 'stable'
# run: |
# # @deno/emit doesn't work if JSR modules are not in the cache.
# # This is a workaround to cache the JSR modules beforehand.
# deno cache ./src/utils/mod.ts
# deno run --allow-read --allow-env --allow-net ./tools/bundle.ts ./src/utils/mod.ts > ./action/latest.deps.js
# diff ./action/latest.deps.js ./action/deps.js
- name: Run tests
# Deno 1.x does not support lockfile v4. To work around this, we append
# `--no-lock` in this case.
run: deno test -A ${{ matrix.deno == 'old' && '--no-lock' || '' }} tests/ src/