feat: calculations #180
Workflow file for this run
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: WEB-CI | |
on: | |
pull_request: | |
branches: | |
- "main" | |
paths: | |
- ".github/workflows/web_ci.yaml" | |
- "frontend/rust-lib/**" | |
- "frontend/appflowy_web/**" | |
env: | |
CARGO_TERM_COLOR: always | |
NODE_VERSION: "18.16.0" | |
PNPM_VERSION: "8.5.0" | |
RUST_TOOLCHAIN: "1.75" | |
CARGO_MAKE_VERSION: "0.36.6" | |
jobs: | |
web-build: | |
if: github.event.pull_request.draft != true | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [ubuntu-latest] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Cache Rust Dependencies | |
uses: Swatinem/rust-cache@v2 | |
with: | |
key: rust-dependencies-${{ runner.os }} | |
workspaces: | | |
frontend/rust-lib | |
frontend/appflowy_web/appflowy_wasm | |
- name: Cache Node.js dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ~/.npm | |
key: npm-${{ runner.os }} | |
- name: Cache node_modules | |
uses: actions/cache@v2 | |
with: | |
path: frontend/appflowy_web/node_modules | |
key: node-modules-${{ runner.os }} | |
- name: Install Rust toolchain | |
id: rust_toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ env.RUST_TOOLCHAIN }} | |
override: true | |
profile: minimal | |
- name: Install wasm-pack | |
run: cargo install wasm-pack | |
- uses: taiki-e/install-action@v2 | |
with: | |
tool: cargo-make@${{ env.CARGO_MAKE_VERSION }} | |
- name: install dependencies | |
if: matrix.platform == 'ubuntu-latest' | |
working-directory: frontend | |
run: | | |
sudo apt-get update | |
npm install -g pnpm@${{ env.PNPM_VERSION }} | |
cargo make install_web_protobuf | |
- name: Build | |
working-directory: frontend/appflowy_web | |
run: | | |
pnpm install | |
pnpm run build_release_wasm |