-
Notifications
You must be signed in to change notification settings - Fork 12
73 lines (59 loc) · 1.82 KB
/
test-move.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
name: Move Tests
on:
pull_request:
push:
branches:
- main
- releases/**
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
SUI_VERSION: mainnet-v1.25.3
jobs:
test-move:
runs-on: ubuntu-latest
steps:
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libpq-dev
- name: Cache Sui binaries
id: cache-sui
uses: actions/cache/restore@v4
with:
path: sui-binaries/
key: sui-${{ env.SUI_VERSION }}
- name: Download and Install Sui
if: steps.cache-sui.outputs.cache-hit != 'true'
run: |
curl -L -o sui-${SUI_VERSION}-ubuntu-x86_64.tgz https://github.com/MystenLabs/sui/releases/download/${SUI_VERSION}/sui-${SUI_VERSION}-ubuntu-x86_64.tgz
tar -xvf sui-${SUI_VERSION}-ubuntu-x86_64.tgz
mkdir -p sui-binaries
mv ./sui ./sui-binaries/
mv ./sui-debug ./sui-binaries/
rm -rf sui-${SUI_VERSION}-ubuntu-x86_64.tgz
- name: Save Sui binaries
if: steps.cache-sui.outputs.cache-hit != 'true'
id: cache-sui-save
uses: actions/cache/save@v4
with:
path: sui-binaries/
key: ${{ steps.cache-sui.outputs.cache-primary-key }}
- name: Add Sui binaries to PATH
run: |
sudo cp ./sui-binaries/sui /usr/local/bin/sui
sudo cp ./sui-binaries/sui-debug /usr/local/bin/sui-debug
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Test
run: npm run test-move