-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (50 loc) · 1.55 KB
/
ci.yml
File metadata and controls
58 lines (50 loc) · 1.55 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
name: deno_redis
on: [push, pull_request]
jobs:
build-and-deploy:
name: ${{ matrix.kind }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
matrix:
os: [macOS-latest]
kind: ["test", "lint"]
steps:
- name: Clone repository
uses: actions/checkout@v1
- name: Install rust
uses: hecrj/setup-rust-action@v1
with:
rust-version: "1.41.0"
- name: Install clippy and rustfmt
if: matrix.kind == 'lint'
run: |
rustup component add clippy
rustup component add rustfmt
- name: Install Deno
uses: denolib/setup-deno@master
with:
deno-version: 0.35.0
- name: Start Redis (MacOs)
if: matrix.kind == 'test' && startsWith(matrix.os, 'mac')
run: |
brew install redis
brew services start redis
- name: Run test.ts
run: |
RUST_BACKTRACE=1 deno run --allow-all test.ts
- name: Cache cargo registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v1
with:
path: target
key: ${{ matrix.kind }}-${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}