mirror of
https://github.com/fluencelabs/examples
synced 2025-03-30 14:41:06 +00:00
* reflecting the deployment config changes * Try temporary CI fix (#345) Co-authored-by: igor <dev@igor.sh> Co-authored-by: Anatoly Laskaris <github_me@nahsi.dev>
75 lines
2.5 KiB
YAML
75 lines
2.5 KiB
YAML
name: Run tests for js-based projects
|
|
|
|
on:
|
|
push:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version: [16.x]
|
|
working-directory: [
|
|
"./quickstart/1-browser-to-browser",
|
|
"./quickstart/3-browser-to-service",
|
|
"./fluence-js-examples/hello-world",
|
|
"./fluence-js-examples/browser-example",
|
|
"./fluence-js-examples/node-example",
|
|
"./aqua-examples/echo-greeter/client-peer",
|
|
"./aqua-examples/price-oracle/client-peer",
|
|
"./aqua-examples/price-oracle/web"
|
|
]
|
|
fail-fast: false
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
### Prepare cargo & toolchains
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
~/.cargo/bin
|
|
target
|
|
key: ${{ runner.os }}-cargo-v2-${{ hashFiles('**/Cargo.lock') }}
|
|
- name: Install Rust toolchain with wasm32-unknown-unknown
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: nightly-2022-06-27
|
|
target: wasm32-unknown-unknown
|
|
profile: minimal
|
|
override: true
|
|
- name: Install wasm32-wasi
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: nightly-2022-06-27
|
|
target: wasm32-wasi
|
|
profile: minimal
|
|
|
|
- name: Install marine
|
|
run: cargo install marine || true
|
|
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: ~/.npm
|
|
key: ${{ runner.os }}-v1-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-v1-node-${{ matrix.node-version }}
|
|
|
|
- name: Setup Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
### === Rust tests ===
|
|
- name: run tests
|
|
working-directory: ${{ matrix.working-directory }}
|
|
env:
|
|
CI: true
|
|
run: |
|
|
npm i
|
|
CI=false npm run build
|
|
npm run test
|