-
Notifications
You must be signed in to change notification settings - Fork 6
71 lines (63 loc) · 1.9 KB
/
test.yml
File metadata and controls
71 lines (63 loc) · 1.9 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
name: test
on:
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.85.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
# This puts Katana in the path for integration tests.
# Use this for Katana once Torii will update its examples.
# curl -L https://github.com/dojoengine/katana/releases/download/v1.5.0-alpha.2/katana_v1.5.0-alpha.2_linux_amd64.tar.gz -o katana.tar.gz;
# tar -C /usr/local/bin -xzf katana.tar.gz
- name: Setup for integration tests
run: |
curl -L https://github.com/dojoengine/dojo/releases/download/v1.4.2/dojo_v1.4.2_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
KATANA_RUNNER_BIN=/usr/local/bin/katana cargo nextest run --all-features --workspace --build-jobs 20