Skip to content

Commit 9267ba3

Browse files
committed
Add Github Actions CI
1 parent a6b42f3 commit 9267ba3

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/rust.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-18.04
8+
env:
9+
CARGO_TERM_COLOR: always
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
14+
- name: Cache cargo registry
15+
uses: actions/cache@v1
16+
with:
17+
path: ~/.cargo/registry
18+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
19+
20+
- name: Cache cargo index
21+
uses: actions/cache@v1
22+
with:
23+
path: ~/.cargo/git
24+
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
25+
26+
- name: Cache cargo build
27+
uses: actions/cache@v1
28+
with:
29+
path: target
30+
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
31+
32+
#- name: Check formatting
33+
# run: cargo fmt -- --check
34+
35+
- name: Check for errors
36+
run: cargo check
37+
38+
- name: Run tests (Bitcoin mode)
39+
run: cargo test
40+
41+
- name: Run tests (Liquid mode)
42+
run: cargo test --features liquid

0 commit comments

Comments
 (0)