Skip to content

Commit 4716a06

Browse files
authored
WIP: Ocean test suite CI (#2734)
* wip * fail-fast false
1 parent 5dcb599 commit 4716a06

1 file changed

Lines changed: 96 additions & 0 deletions

File tree

.github/workflows/tests-ocean.yml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
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+
strategy:
64+
fail-fast: false
65+
66+
steps:
67+
- uses: actions/checkout@v4
68+
with:
69+
repository: birthdayresearch/jellyfishsdk
70+
ref: 'main'
71+
72+
- name: Download binaries
73+
uses: actions/download-artifact@v3
74+
with:
75+
name: defi-bins
76+
77+
- name: Download docker
78+
uses: actions/download-artifact@v3
79+
with:
80+
name: defi-docker
81+
82+
- name: Setup permissions
83+
run: |
84+
chmod uog+x "$(pwd)/defid"
85+
86+
- uses: actions/setup-node@v3
87+
with:
88+
node-version: '18'
89+
90+
- name: Install dependencies
91+
run: |
92+
npm ci
93+
94+
- name: Run tests
95+
run: |
96+
DEFICHAIN_DOCKER_IMAGE=test-build-container DEFID="$(pwd)/defid" npm t apps/whale-api/src/module.api

0 commit comments

Comments
 (0)