forked from DeFiCh/ain
-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (76 loc) · 2.17 KB
/
tests-ocean.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
name: Tests - Jellyfish Whale Apis
on:
workflow_dispatch:
pull_request:
branches:
- master
- feature/ocean-archive # TODO(): remove before merge to master
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
env:
TARGET: x86_64-pc-linux-gnu
MAKE_DEBUG: 0
GIT_VERSION: 1
jobs:
build:
runs-on: ubuntu-latest
container: defi/ain-builder:latest
env:
CARGO_INCREMENTAL: 0
steps:
- uses: actions/checkout@v4
- run: git config --global --add safe.directory '*'
- name: Populate environment
run: ./make.sh ci-export-vars
- name: Setup dependencies
run: ./make.sh ci-setup-deps
- name: Setup user dependencies
run: ./make.sh ci-setup-user-deps
- name: Restore cpp build cache
id: cpp-cache-restore
uses: actions/cache/restore@v3
with:
path: |
./build/depends
./build/src
~/.ccache
key: cpp-${{ env.TARGET }}-${{ env.BUILD_TYPE }}
- uses: Swatinem/rust-cache@v2
with:
workspaces: lib -> ../build/lib/target
save-if: ${{ github.ref == 'refs/heads/master' }}
shared-key: ${{ env.TARGET }}
- name: Build binaries
run: ./make.sh build
- name: Upload binaries
uses: actions/upload-artifact@v3
with:
name: defi-bins
path: build/src/defid
test:
name: Jellyfish Whale Api tests
runs-on: ubuntu-latest
needs: [build]
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
repository: birthdayresearch/jellyfishsdk
# ref: 'main'
ref: 'canonbrother/whale-defid' # TODO(): remove before merge to master
- name: Download binaries
uses: actions/download-artifact@v3
with:
name: defi-bins
- name: Setup permissions
run: |
chmod uog+x "$(pwd)/defid"
- uses: actions/setup-node@v3
with:
node-version: '18'
- name: Run tests
run: |
npm ci
DEFID="$(pwd)/defid" npm run defid apps/whale-api/src/module.api/__defid__