-
-
Notifications
You must be signed in to change notification settings - Fork 3
55 lines (44 loc) · 1.26 KB
/
ci.yaml
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
name: CI
on: [push, pull_request]
jobs:
build:
name: Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
fail-fast: true
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Setup Node
if: matrix.os == 'ubuntu-latest'
uses: actions/setup-node@v3
with:
node-version: 18
- name: Check Code Format
if: matrix.os == 'ubuntu-latest'
run: deno fmt --check
- name: Lint
if: matrix.os == 'ubuntu-latest'
run: deno lint
- name: Check
if: matrix.os == 'ubuntu-latest'
run: deno check mod.ts
- name: Tests
run: deno test --allow-net --coverage=./cov
- name: Generate Coverage
if: matrix.os == 'ubuntu-latest'
run: deno coverage --unstable --lcov ./cov > cov.lcov
- name: Upload Coverage
if: matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v2
with:
files: cov.lcov
- name: Node Test
if: matrix.os == 'ubuntu-latest'
run: deno run -A scripts/node.ts