-
Notifications
You must be signed in to change notification settings - Fork 26
118 lines (93 loc) · 2.88 KB
/
run-tests.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
name: "test"
on:
pull_request:
paths-ignore:
- "**.md"
- ".github/**"
- "!.github/workflows/run-tests.yml"
push:
branches:
- "master"
paths-ignore:
- "**.md"
- ".github/**"
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
env:
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
jobs:
tests:
name: "marine / cargo and marine-js"
runs-on: builder
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: dsherret/rust-toolchain-file@v1
- name: Setup cache
uses: Swatinem/rust-cache@v2
with:
cache-directories: ~/.cache/sccache
shared-key: marine
# github allows only 10GB of cache
# so save cache only on merge to master
# to use less space and speed up CI
save-if: ${{ github.event_name == 'push' }}
- name: Setup sccache
uses: mozilla-actions/[email protected]
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install wasm-pack
uses: jetli/[email protected]
- name: Install marine cli
run: cargo install --path tools/cli
- name: Build marine-js wasm
run: ./build.sh
working-directory: marine-js
- name: Install marine-js npm dependencies
uses: bahmutov/npm-install@v1
with:
working-directory: marine-js/npm-package
- name: Build marine-js npm package
run: npm run build
working-directory: marine-js/npm-package
- name: Build examples
run: ./build.sh
working-directory: examples
- name: Build marine-runtime wasm-tests
run: ./build.sh
working-directory: marine/tests/wasm_tests
- name: Build marine-core wasm-tests
run: ./build.sh
working-directory: core/tests/wasm_tests
- name: Run cargo check
run: |
cargo check -v --all-features \
-p marine-core \
-p marine-runtime \
-p fluence-app-service \
-p marine \
-p mrepl
- uses: taiki-e/install-action@nextest
- name: Run cargo nextest
run: cargo nextest run --release -v --all-features --profile ci \
-p marine-core \
-p marine-runtime
- name: Upload test report
uses: dorny/test-reporter@v1
if: (success() || failure()) && !github.event.pull_request.head.repo.fork
with:
name: marine report
path: target/nextest/ci/junit.xml
reporter: java-junit
- name: Run cargo clippy
run: cargo clippy -v
- name: Run marine-js smoke tests
run: npm run test
working-directory: marine-js/npm-package
- name: Run cargo fmt
run: cargo fmt --all -- --check