-
Notifications
You must be signed in to change notification settings - Fork 88
119 lines (113 loc) · 3.82 KB
/
check_build_test.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: Check-Build-Test
on:
push:
branches: [ 'main' ]
paths-ignore:
- 'docs/**'
- 'fixtures/**'
- 'kube/**'
- '**.md'
pull_request:
branches: [ 'main' ]
paths-ignore:
- 'docs/**'
- 'fixtures/**'
- 'kube/**'
- '**.md'
env:
CARGO_TERM_COLOR: always
jobs:
check_build_test:
name: Check-Build-Test
runs-on: self-hosted
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Install GitHub CLI
run: |
(type -p wget >/dev/null || (sudo apt update && sudo apt-get install wget -y)) \
&& sudo mkdir -p -m 755 /etc/apt/keyrings \
&& wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
&& sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& sudo apt update \
&& sudo apt install gh -y
- uses: ./.github/actions/rust-setup # Using relative path to reference the action in the current branch
# Todo self-hosted install docker fail
#- name: Set up Docker
# uses: docker-practice/actions-setup-docker@master
#- name: Start Docker
# run: |
# docker --version
# sudo dockerd &
# sleep 6
# docker images
- name: Check Docker
run: |
docker --version
sleep 6
docker images
docker pull lncm/bitcoind:v25.1
docker pull bitseed/ord:0.18.0-burn
docker pull bitseed/bitseed:0.1.8
- name: Check code format
run: cargo fmt -- --check
- name: Lint rust sources
run: ./scripts/pr.sh -c
- name: Build
run: cargo build
- name: Framework compatibility
run: cargo run --package framework-release --bin framework-release
- name: Run Rooch init
run: cargo run --bin rooch init --skip-password
- name: Execute Move stdlib and framework tests
run: ./scripts/pr.sh -m
- name: Execute rust tests
run: ./scripts/pr.sh -t
- name: Build and test example projects
run: ./scripts/pr.sh -e
# web & sdk & dashboard
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '20.3.1'
- name: Cache Node.js modules
uses: actions/cache@v2
with:
path: ~/.pnpm-store
key: ${{ runner.OS }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.OS }}-pnpm-
## Build and test app start
- name: Install pnpm dependencies
run: npm install [email protected] -g && pnpm install
- name: Install playwright browsers
run: pnpm bitseed-sdk playwright-deps
- name: Lint
run: pnpm lint
continue-on-error: true
timeout-minutes: 15
- name: Build Test Suite
run: pnpm test-suite build
- name: Build SDK
run: pnpm rooch-sdk build
- name: Test SDK
run: pnpm rooch-sdk test
- name: Build SDK KIT
run: pnpm rooch-sdk-kit build
- name: Test SDK KIT
run: pnpm rooch-sdk-kit test
- name: Lint Bitseed SDK
run: pnpm bitseed-sdk lint
- name: Build Bitseed SDK
run: pnpm bitseed-sdk build
- name: Test Bitseed SDK
run: pnpm bitseed-sdk test
continue-on-error: true
timeout-minutes: 15
- uses: CatChen/check-git-status-action@v1
with:
fail-if-not-clean: true # optional
push-if-not-clean: false # optional
targets: '.' #optional