Skip to content

Commit

Permalink
refactor!: adapt to new holochain websocket (#51)
Browse files Browse the repository at this point in the history
* ci: revert addition of main-rcs

* ci: restore/save caches individually

* refactor: adapt to new holochain websocket

* test: do not fail fast

* revert string url -> socket addr

* refactor: increase admin ws default timeout to 2 mins

* refactor: increase admin ws default timeout to 3 mins

* refactor: change url string param to socket addr in websockets
  • Loading branch information
jost-s authored Mar 11, 2024
1 parent b573030 commit 70994c8
Show file tree
Hide file tree
Showing 13 changed files with 423 additions and 391 deletions.
46 changes: 31 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Test
on:
pull_request:
push:
branches: [develop, main, main-rcs]
branches: [develop, main]

env:
CARGO_TERM_COLOR: always
Expand All @@ -15,6 +15,7 @@ concurrency:
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
Expand All @@ -30,35 +31,50 @@ jobs:
with:
name: holochain-ci

- name: Cache fixture
uses: actions/cache@v4
- name: Install nix packages
run: nix develop -c $SHELL -c "holochain --version"

- name: Restore fixture
uses: actions/cache/restore@v4
env:
cache-name: fixture
with:
path: fixture/zomes/foo/target
key: ${{ matrix.os }}-build-${{ env.cache-name }}-${{ hashFiles('fixture/zomes/foo/Cargo.lock') }}

- name: Cache client build
uses: actions/cache@v4
if: always()
env:
cache-name: client
with:
path: target
key: ${{ matrix.os }}-cargo-${{ env.cache-name }}-${{ hashFiles('Cargo.lock') }}

- name: Install nix packages
run: nix develop -c $SHELL -c "holochain --version"

- name: Build fixture
run: nix develop -c $SHELL -c "./build-fixture.sh"

- name: Save fixture to cache
uses: actions/cache/save@v4
env:
cache-name: fixture
with:
path: fixture/zomes/foo/target
key: ${{ matrix.os }}-build-${{ env.cache-name }}-${{ hashFiles('fixture/zomes/foo/Cargo.lock') }}

- name: Clean up nix files to prevent insufficient disk space
run: nix-collect-garbage -d

- name: Restore client build
uses: actions/cache/restore@v4
env:
cache-name: client
with:
path: target
key: ${{ matrix.os }}-cargo-${{ env.cache-name }}-${{ hashFiles('Cargo.lock') }}

- name: Build client
run: cargo build -p holochain_client

- name: Save client build to cache
uses: actions/cache/save@v4
env:
cache-name: client
with:
path: target
key: ${{ matrix.os }}-cargo-${{ env.cache-name }}-${{ hashFiles('Cargo.lock') }}

- name: Lint
run: cargo clippy --all-features -- -D warnings

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

### Added
### Changed
- **BREAKING**: The underlying package `holochain_websocket` changed. All websockets in this client follow the new `connect` function and take a socket address that implements `ToSocketAddr` instead of a URL `String`. Examples for the new parameter are `"localhost:30000"` and `([127.0.0.1], 30000)`. See trait [`ToSocketAddr`](https://doc.rust-lang.org/std/net/trait.ToSocketAddrs.html#tymethod.to_socket_addrs).
### Fixed
### Removed

Expand Down
Loading

0 comments on commit 70994c8

Please sign in to comment.