Skip to content

Commit 42193f6

Browse files
committed
wip
1 parent 834b162 commit 42193f6

1 file changed

Lines changed: 95 additions & 0 deletions

File tree

.github/workflows/tests-ocean.yml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: Tests - Jellyfish Whale Apis
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
branches:
7+
- master
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
11+
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
12+
13+
env:
14+
MAKE_DEBUG: 0
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
container: defi/ain-builder:latest
20+
env:
21+
CARGO_INCREMENTAL: 0
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
- run: git config --global --add safe.directory '*'
26+
27+
- name: Populate environment
28+
run: ./make.sh ci-export-vars
29+
30+
- name: Setup dependencies
31+
run: ./make.sh ci-setup-deps
32+
33+
- name: Setup user dependencies
34+
run: ./make.sh ci-setup-user-deps
35+
36+
- uses: Swatinem/rust-cache@v2
37+
with:
38+
workspaces: lib -> ../build/lib/target
39+
save-if: ${{ github.ref == 'refs/heads/master' }}
40+
41+
- name: Build binaries
42+
run: ./make.sh build
43+
44+
- name: Upload binaries
45+
uses: actions/upload-artifact@v3
46+
with:
47+
name: defi-bins
48+
path: build/src/defid
49+
50+
- name: Build docker
51+
run: "docker build -t test-build-container -f ./contrib/dockerfiles/x86_64-pc-linux-gnu.dockerfile ."
52+
53+
- name: Upload docker
54+
uses: actions/upload-artifact@v3
55+
with:
56+
name: defi-docker
57+
path: .
58+
59+
test:
60+
name: Jellyfish Whale Api tests
61+
runs-on: ubuntu-latest
62+
needs: build
63+
64+
steps:
65+
- uses: actions/checkout@v4
66+
with:
67+
repository: birthdayresearch/jellyfishsdk
68+
ref: 'main'
69+
70+
- name: Download binaries
71+
uses: actions/download-artifact@v3
72+
with:
73+
name: defi-bins
74+
75+
- name: Download docker
76+
uses: actions/download-artifact@v3
77+
with:
78+
name: defi-docker
79+
80+
- name: Setup permissions
81+
run: |
82+
chmod uog+x "$(pwd)/defid"
83+
84+
- uses: actions/setup-node@v3
85+
with:
86+
node-version: '18'
87+
88+
- name: Install dependencies
89+
run: |
90+
npm ci
91+
92+
- name: Run tests
93+
# DEFICHAIN_DOCKER_IMAGE=test-build-container DEFID="$(pwd)/defid" npm t apps/whale-api/src/module.api
94+
run: |
95+
DEFICHAIN_DOCKER_IMAGE=test-build-container DEFID="$(pwd)/defid" npm t

0 commit comments

Comments
 (0)