-
Notifications
You must be signed in to change notification settings - Fork 13
75 lines (63 loc) · 2.2 KB
/
_external_rust_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
name: Rust tests
on:
workflow_call:
inputs:
changedCrates:
type: string
required: false
concurrency:
group: ext-rust-tests-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/develop' }}
env:
CARGO_TERM_COLOR: always
RUST_LOG: "error"
CARGO_INCREMENTAL: 0
jobs:
test:
name: Test external crates
if: (!cancelled())
env:
# Tests written with #[sim_test] are often flaky if run as #[tokio::test] - this var
# causes #[sim_test] to only run under the deterministic `simtest` job, and not the
# non-deterministic `test` job.
IOTA_SKIP_SIMTESTS: 1
runs-on: [self-hosted]
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: taiki-e/install-action@375e0c7f08a66b8c2ba7e7eef31a6f91043a81b0 # v2.44.38
with:
tool: nextest
- name: Install python dependencies
run: pip install pyopenssl --upgrade --break-system-packages
- name: cargo test
run: |
array=(${{ inputs.changedCrates }})
result=""
for item in "${array[@]}"; do
mapped_item="-E 'rdeps(${item})'"
if [ -z "$result" ]; then
result="$mapped_item"
else
result="$result $mapped_item"
fi
done
command="cargo nextest run \
--config-file .config/nextest.toml \
--manifest-path external-crates/move/Cargo.toml \
-E '!test(prove) and !test(run_all::simple_build_with_docs/args.txt) and !test(run_test::nested_deps_bad_parent/Move.toml)' \
$result \
--profile ci"
echo "$command"
eval ${command}
check-unused-deps:
name: Check Unused Dependencies (${{ matrix.flags }})
if: (!cancelled())
strategy:
matrix:
flags: ["--all-features", "--no-default-features"]
fail-fast: false
runs-on: [self-hosted]
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Run Cargo Udeps
run: cargo +nightly ci-udeps-external ${{ matrix.flags }}