|
1 | | -name: CI |
| 1 | +name: Tests |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
5 | | - branches: [develop] |
| 5 | + branches: [develop, sdk-bindings] |
6 | 6 | pull_request: |
7 | 7 | types: [opened, synchronize, reopened, ready_for_review] |
8 | 8 | workflow_dispatch: |
9 | 9 | schedule: [cron: "40 1 * * *"] |
10 | 10 |
|
11 | 11 | concurrency: |
12 | | - group: ci-${{ github.event.pull_request.number || github.ref }} |
| 12 | + group: tests-${{ github.event.pull_request.number || github.ref }} |
13 | 13 | cancel-in-progress: ${{ github.ref != 'refs/heads/develop' }} |
14 | 14 |
|
15 | 15 | permissions: |
|
19 | 19 | RUSTFLAGS: -Dwarnings |
20 | 20 |
|
21 | 21 | jobs: |
22 | | - test: |
| 22 | + tests: |
23 | 23 | runs-on: ubuntu-latest |
24 | 24 |
|
25 | 25 | steps: |
26 | 26 | - name: Checkout repository |
27 | | - uses: actions/checkout@v4 |
| 27 | + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
28 | 28 |
|
29 | 29 | - name: rust version |
30 | 30 | run: | |
|
36 | 36 | - name: Run tests |
37 | 37 | run: make test |
38 | 38 |
|
39 | | - lint: |
40 | | - runs-on: ubuntu-latest |
41 | | - |
42 | | - steps: |
43 | | - - name: Checkout repository |
44 | | - uses: actions/checkout@v4 |
45 | | - |
46 | | - - uses: taiki-e/install-action@cargo-hack |
47 | | - |
48 | | - - name: Install latest nightly |
49 | | - run: rustup toolchain install nightly --component rustfmt --allow-downgrade |
50 | | - |
51 | | - - name: rustfmt |
52 | | - run: make check-fmt |
53 | | - |
54 | | - - name: clippy |
55 | | - run: make clippy |
56 | | - |
57 | | - - name: rustdoc |
58 | | - run: make doc |
59 | | - |
60 | | - - name: feature compatibility |
61 | | - run: make check-features |
62 | | - |
63 | | - wasm: |
64 | | - runs-on: ubuntu-latest |
65 | | - |
66 | | - steps: |
67 | | - - name: Checkout repository |
68 | | - uses: actions/checkout@v4 |
69 | | - |
70 | | - - name: rust version |
71 | | - run: | |
72 | | - rustc --version |
73 | | - cargo --version |
74 | | -
|
75 | | - - uses: taiki-e/install-action@wasm-pack |
76 | | - |
77 | | - - name: Install clang |
78 | | - run: sudo apt-get install -y clang |
79 | | - |
80 | | - - name: Run tests in wasm |
81 | | - run: RUSTFLAGS='-Dwarnings --cfg getrandom_backend="wasm_js"' make wasm |
82 | | - |
83 | | - run_tests_with_network: |
| 39 | + tests-with-network: |
84 | 40 | runs-on: ubuntu-latest |
85 | 41 | env: |
86 | 42 | EPOCH_DURATION_MS: 10000 |
|
101 | 57 | - 5432:5432 |
102 | 58 | steps: |
103 | 59 | - name: Checkout repository |
104 | | - uses: actions/checkout@v4 |
| 60 | + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
105 | 61 |
|
106 | 62 | - name: rust version |
107 | 63 | run: | |
@@ -132,3 +88,14 @@ jobs: |
132 | 88 | run: | |
133 | 89 | sleep $((EPOCH_DURATION_MS / 1000)) # wait for the network to get to epoch #2 |
134 | 90 | make test-with-localnet |
| 91 | +
|
| 92 | + doctests: |
| 93 | + runs-on: ubuntu-latest |
| 94 | + steps: |
| 95 | + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| 96 | + - name: doctests |
| 97 | + run: | |
| 98 | + cargo test --doc |
| 99 | + - name: rustdoc |
| 100 | + run: | |
| 101 | + cargo doc --all-features --workspace --no-deps |
0 commit comments