chore: Cargo.toml config and readme #22
This file contains 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: ic-websocket-cdk-rs tests | |
# only run when a commit is pushed to the main branch | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
unit-and-integration-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: "npm" | |
cache-dependency-path: "tests/package-lock.json" | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: 1.69.0 | |
- uses: aviate-labs/[email protected] | |
with: | |
dfx-version: 0.14.1 | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
cache-on-failure: "true" | |
- name: Run unit tests | |
run: cargo test | |
- name: Install dependencies for integration tests | |
run: cd tests && npm install | |
- name: Prepare environment for integration tests | |
run: | | |
cd tests | |
rustup target add wasm32-unknown-unknown | |
dfx start --clean --background | |
npm run deploy:tests | |
npm run generate | |
- name: Run integration tests | |
run: cd tests && npm run test:integration |