-
Notifications
You must be signed in to change notification settings - Fork 5
79 lines (69 loc) · 2 KB
/
test.yml
File metadata and controls
79 lines (69 loc) · 2 KB
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
name: test
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "crates/**"
- "examples/**"
- "bin/**"
- "xtask/**"
- "Cargo.toml"
- "Cargo.lock"
pull_request:
paths:
- "crates/**"
- "examples/**"
- "bin/**"
- "xtask/**"
- "Cargo.toml"
- "Cargo.lock"
env:
CARGO_TERM_COLOR: always
RUST_VERSION: 1.90.0
jobs:
fmt:
runs-on: ubuntu-latest
container:
image: ghcr.io/dojoengine/torii-dev:latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- run: scripts/rust_fmt.sh
clippy:
needs: [fmt]
runs-on: ubuntu-latest-4-cores
container:
image: ghcr.io/dojoengine/torii-dev:latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- run: ./scripts/clippy.sh
test:
needs: [fmt, clippy]
runs-on: ubuntu-latest-32-cores
container:
image: ghcr.io/dojoengine/torii-dev:latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- uses: software-mansion/setup-scarb@v1
with:
scarb-version: "2.12.2"
# This puts Katana in the path for integration tests.
- name: Download Katana for integration tests
run: |
curl -L https://github.com/dojoengine/katana/releases/download/v1.7.0/katana_v1.7.0_linux_amd64.tar.gz -o katana.tar.gz;
tar -C /usr/local/bin -xzf katana.tar.gz
- name: Setup for integration tests
run: |
rustup default stable
curl -L https://github.com/dojoengine/dojo/releases/download/v1.7.1/dojo_v1.7.1_linux_amd64.tar.gz -o dojo.tar.gz
tar -C /usr/local/bin -xzf dojo.tar.gz
sozo build --manifest-path examples/spawn-and-move/Scarb.toml
sozo build --manifest-path crates/types-test/Scarb.toml
- name: Run tests
run: |
bash scripts/extract_test_db.sh
cargo nextest run --all-features --workspace --build-jobs 20