[testnet] Correct the tests that fails #2877
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: ubuntu-latest | |
| 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: ubuntu-latest | |
| 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 |