-
Notifications
You must be signed in to change notification settings - Fork 32
77 lines (63 loc) · 1.87 KB
/
test.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Test
on:
pull_request:
branches:
- master
push:
branches:
- master
defaults:
run:
shell: bash
env:
SOLANA_VERSION: 1.10.40
jobs:
lint_and_test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Setup Node
uses: actions/setup-node@v3
with:
cache: yarn
- name: Cache Cargo
uses: actions/cache@v3
id: cache-cargo-build
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
./target/
key: cargo-${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
# - name: Cache Solana
# uses: actions/cache@v3
# id: cache-solana
# with:
# path: |
# ~/.cache/solana/
# ~/.local/share/solana/
# key: solana-${{ runner.os }}-${{ env.SOLANA_VERSION }}
# - run: sudo apt-get update && sudo apt-get install -y pkg-config build-essential libudev-dev
# - run: sh -c "$(curl -sSfL https://release.solana.com/v${{ env.SOLANA_VERSION }}/install)"
# - run: echo "/home/runner/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
# - run: solana-keygen new --no-bip39-passphrase
# - run: solana config set --url localhost
- name: Install Dependencies
run: yarn #&& yarn global add @project-serum/anchor-cli
- name: Lint
run: yarn lint
- name: Cargo Tests
run: cargo test
- name: SDK Lint and Test
working-directory: typescript
run: yarn prepublishOnly
- name: SDK Build Check
working-directory: typescript
run: yarn build && yarn clean