-
-
Notifications
You must be signed in to change notification settings - Fork 45
100 lines (96 loc) · 2.7 KB
/
build.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: CI
on:
push:
branches:
- "**"
pull_request:
branches:
- "**"
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
redis: [6.2]
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
- name: Get Deno version
run: |
echo "DENO_VERSION=$(cat .denov)" >> $GITHUB_ENV
- name: Set up Deno ${{ env.DENO_VERSION }}
uses: denoland/setup-deno@main
with:
deno-version: ${{ env.DENO_VERSION }}
- uses: actions/cache@v3
with:
path: |
~/.deno
~/.cache/deno
key: ${{ runner.os }}-deno-${{ hashFiles('**/import_map.json', '**/.deno-version', '**/modules-lock.json') }}
- name: Check mod.ts
run: |
deno task make_mod
git diff --exit-code
deno check mod.ts
- name: Run lint
run: |
deno fmt --check
deno lint
- name: Set up Redis ${{ matrix.redis }}
uses: shogo82148/actions-setup-redis@v1
with:
redis-version: ${{ matrix.redis }}
auto-start: "true"
- name: Run tests
run: |
deno task test
- name: Run doc tests
run: |
deno task test:doc
- name: Generate an lcov report
run: |
deno task coverage
- uses: k1LoW/octocov-action@v0
benchmark:
runs-on: ubuntu-latest
strategy:
matrix:
redis: [6.2]
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
- name: Get Deno version
run: |
echo "DENO_VERSION=$(cat .denov)" >> $GITHUB_ENV
- name: Set up Deno ${{ env.DENO_VERSION }}
uses: denoland/setup-deno@main
with:
deno-version: ${{ env.DENO_VERSION }}
- uses: actions/cache@v3
with:
path: |
~/.deno
~/.cache/deno
key: ${{ runner.os }}-deno-benchmark-${{ hashFiles('**/import_map.json', '**/.deno-version', '**/modules-lock.json') }}
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "16"
- uses: bahmutov/npm-install@v1
with:
working-directory: benchmark
- name: Set up Redis ${{ matrix.redis }}
uses: shogo82148/actions-setup-redis@v1
with:
redis-version: ${{ matrix.redis }}
auto-start: "true"
- name: Run benchmarks (ioredis)
run: |
deno task bench:ioredis
- name: Run benchmarks (deno-redis)
run: |
deno task bench:deno-redis
- name: Output results as a job summary
run: |
deno run --allow-read=tmp tools/format-benchmark-results.js >> $GITHUB_STEP_SUMMARY