-
Notifications
You must be signed in to change notification settings - Fork 2.3k
123 lines (114 loc) · 4.08 KB
/
web.yml
File metadata and controls
123 lines (114 loc) · 4.08 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: Web
on:
push:
branches: [ 'devnet_*', 'testnet_*' ]
merge_group:
pull_request:
branches:
- "**"
workflow_dispatch:
# This allows a subsequently queued workflow run to interrupt previous runs on pull requests
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.run_id }}'
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUST_BACKTRACE: full
# We allow redundant explicit links because `cargo rdme` doesn't know how to resolve implicit intra-crate links.
RUSTDOCFLAGS: -A rustdoc::redundant_explicit_links -D warnings
RUSTUP_MAX_RETRIES: 10
RUST_LOG: linera=debug
RUST_LOG_FORMAT: plain
LINERA_STORAGE_SERVICE: 127.0.0.1:1235
LINERA_WALLET: /tmp/local-linera-net/wallet_0.json
LINERA_KEYSTORE: /tmp/local-linera-net/keystore_0.json
LINERA_STORAGE: rocksdb:/tmp/local-linera-net/client_0.db
LINERA_FAUCET_URL: http://localhost:8079
permissions:
contents: read
jobs:
changed-files:
runs-on: linera-io-self-hosted-ci
outputs:
should-run: ${{ steps.files-changed.outputs.paths }}
steps:
- uses: actions/checkout@v4
- name: Filter paths
uses: dorny/paths-filter@v3
id: files-changed
with:
predicate-quantifier: 'every'
filters: |
paths:
- '!docker/**'
- '!docker_scylla/**'
- '!configuration/**'
- '!kubernetes/**'
- '!CONTRIBUTING.md'
- '!INSTALL.md'
- '!docs/**'
- '!mdbook/**'
web:
needs: changed-files
if: needs.changed-files.outputs.should-run == 'true'
runs-on: linera-io-self-hosted-ci
timeout-minutes: 30
steps:
# Install dependencies
- uses: actions/checkout@v4
- name: Switch to nightly Rust toolchain
run: |
ln -sf toolchains/nightly/rust-toolchain.toml
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rustflags: ""
- uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: nanasess/setup-chromedriver@v2
- uses: jetli/wasm-pack-action@v0.4.0
with:
version: v0.13.1
- uses: jetli/wasm-bindgen-action@v0.2.0
with:
version: 0.2.100
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10.17
# Setup fixtures
- name: Run the storage-service instance
run: |
cargo run --release -p linera-storage-service -- memory --endpoint $LINERA_STORAGE_SERVICE &
- name: Wait for storage service to be ready
run: until nc -z ${LINERA_STORAGE_SERVICE/:/ }; do sleep 1; done
- name: Build binaries
run: |
cargo build --features storage-service --bin linera-server --bin linera-proxy --bin linera
- name: Run the validators
run: |
mkdir /tmp/local-linera-net
cargo run --features storage-service --bin linera -- net up --storage service:tcp:$LINERA_STORAGE_SERVICE:table --policy-config testnet --path /tmp/local-linera-net --validators 2 --shards 2 &
- name: Create two epochs and run the faucet
# See https://github.com/linera-io/linera-protocol/pull/2835 for details.
run: |
mkdir /tmp/linera-faucet
cargo run --bin linera -- resource-control-policy --http-request-timeout-ms 1000
cargo run --bin linera -- resource-control-policy --http-request-timeout-ms 500
cargo run --bin linera -- faucet --storage-path /tmp/linera-faucet/faucet_storage.sqlite --amount 1000 --port 8079 &
- name: Wait for faucet to be ready
run: |
until curl -s http://localhost:8079 >/dev/null; do sleep 1; done
# Run tests
- name: Test the npm packages
run: |
cd web
pnpm install --frozen-lockfile
(cd @linera/client && pnpm exec playwright install)
pnpm -r run ci
- name: Test `linera-views` on the Web
run: |
cd linera-views
WASM_BINDGEN_TEST_TIMEOUT=300 wasm-pack test --chrome --headless -- --features web-default