From 675bd1505a84028e648c5e580ddb8efae31464a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Magalh=C3=A3es?= <joamag@gmail.com> Date: Sun, 11 Dec 2022 16:49:21 +0000 Subject: [PATCH] refactor: automation --- .github/workflows/main.yml | 62 ++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 45255054..551ab240 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,21 +21,22 @@ jobs: runs-on: ubuntu-latest container: rust:${{ matrix.rust-version }} steps: - - uses: actions/checkout@v1 - - run: | + - name: Checkout code from repository + uses: actions/checkout@v3 + - name: Install Rust components + run: | rustup component add rustfmt rustup component add clippy - name: Install Rust components - - run: rustc --version - name: Print Rust information - - run: cargo fmt --all -- --check - name: Verify Rust code format - - run: cargo clippy -- -D warnings -A unknown-lints - name: Verify Rust code linting - - run: cargo build - name: Build development version - - run: cargo build --release - name: Build release version + - name: Print Rust information + run: rustc --version + - name: Verify Rust code format + run: cargo fmt --all -- --check + - name: Verify Rust code linting + run: cargo clippy -- -D warnings -A unknown-lints + - name: Build development version + run: cargo build + - name: Build release version + run: cargo build --release build-wasm: name: Build WASM timeout-minutes: 30 @@ -54,24 +55,25 @@ jobs: runs-on: ubuntu-latest container: rust:${{ matrix.rust-version }} steps: - - uses: actions/checkout@v1 - - run: | + - name: Checkout code from repository + uses: actions/checkout@v3 + - name: Install Rust components + run: | rustup component add rustfmt rustup component add clippy - name: Install Rust components - - run: rustc --version - name: Print Rust information - - run: cargo fmt --all -- --check - name: Verify Rust code format - - run: cargo clippy -- -D warnings -A unknown-lints - name: Verify Rust code linting - - run: cargo install wasm-pack - name: Install wasm-pack - - run: wasm-pack build --release --target=web --out-dir=frontends/web/lib -- --features wasm - name: Build WASM Web binary - - uses: actions/setup-node@v1 + - name: Print Rust information + run: rustc --version + - name: Verify Rust code format + run: cargo fmt --all -- --check + - name: Verify Rust code linting + run: cargo clippy -- -D warnings -A unknown-lints + - name: Install wasm-pack + run: cargo install wasm-pack + - name: Build WASM Web binary + run: wasm-pack build --release --target=web --out-dir=frontends/web/lib -- --features wasm + - name: Install Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - name: Install Node.js - - run: cd frontends/web && npm install && npm run build && npm run lint - name: Build and lint Web code + - name: Build and lint Web code + run: cd frontends/web && npm install && npm run build && npm run lint -- GitLab