-
Notifications
You must be signed in to change notification settings - Fork 666
/
Copy pathpipeline.yml
88 lines (76 loc) · 2.58 KB
/
pipeline.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
env:
RUST_BACKTRACE: short
steps:
- label: "protobuf backward compatibility"
command: |
# We need to manually fetch the latest commit of master to
# correctly compute the commit at which we should diff the proto
# files. Apparently the pipeline doesn't do that for us.
git fetch origin
buf breaking --against ".git#ref=`git merge-base origin/master HEAD`"
agents:
- "distro=amazonlinux"
- "queue=default"
- label: "sanity checks"
command: |
source ~/.cargo/env && set -eux
cargo build -p neard --bin neard --features nightly
cd pytest
python3 -m pip install --progress-bar off --user -r requirements.txt
python3 tests/sanity/spin_up_cluster.py
cd ..
# Note: We're not running spin_up_cluster.py for non-nightly
# because spinning up non-nightly clusters is already covered
# by other steps in the CI, e.g. upgradable.
cargo build -p neard --bin neard
python3 scripts/state/update_res.py check
python3 scripts/check_nightly.py
python3 scripts/check_pytests.py
python3 scripts/check_fuzzing.py
python3 scripts/fix_nightly_feature_flags.py
./scripts/formatting --check
rm -f target/rpc_errors_schema.json
cargo check -p near-jsonrpc --features dump_errors_schema
if ! git --no-pager diff --no-index chain/jsonrpc/res/rpc_errors_schema.json target/rpc_errors_schema.json; then
set +x
echo 'The RPC errors schema reflects outdated typing structure; please run'
echo ' ./chain/jsonrpc/build_errors_schema.sh'
exit 1
fi >&2
agents:
- "distro=amazonlinux"
- "queue=default"
branches: "!master"
- label: "backward compatible"
command: |
source ~/.cargo/env && set -eux
cd pytest
pip3 install --user -r requirements.txt
pwd
ls ..
python3 tests/sanity/backward_compatible.py
ls ../target/debug
branches: "!master !beta !stable"
agents:
- "distro=amazonlinux"
- "queue=default"
- label: "upgradable"
command: |
source ~/.cargo/env && set -eux
cd pytest
pip3 install --user -r requirements.txt
python3 tests/sanity/upgradable.py
branches: "!master"
agents:
- "distro=amazonlinux"
- "queue=default"
- label: "db migration"
command: |
source ~/.cargo/env && set -eux
cd pytest
pip3 install --user -r requirements.txt
python3 tests/sanity/db_migration.py
branches: "!master !beta !stable"
agents:
- "distro=amazonlinux"
- "queue=default"