From 633efb7fc78aaee913a15f40c29a45c172d2ca69 Mon Sep 17 00:00:00 2001 From: Sameer Srivastava Date: Wed, 4 Sep 2024 16:46:25 +0200 Subject: [PATCH] Update lint_master.yml --- .github/workflows/lint_master.yml | 46 ++++++++++++++----------------- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/.github/workflows/lint_master.yml b/.github/workflows/lint_master.yml index 03fdb92f3..f5c98190e 100644 --- a/.github/workflows/lint_master.yml +++ b/.github/workflows/lint_master.yml @@ -3,38 +3,37 @@ name: LintMaster on: push: branches: - - master # Push events on master branch + - master - issue_2083 jobs: ts_lint: runs-on: ubuntu-latest + steps: - - name: Checkout + - name: Checkout code uses: actions/checkout@v2 - - name: libudev-dev + + - name: Set up dependencies run: | - pwd - echo ~ - ls -la ~/.cargo/bin + sudo apt-get update sudo apt-get install -y libudev-dev - - name: install node - uses: actions/setup-node@master + corepack enable + + - name: Set up Node.js + uses: actions/setup-node@v2 with: - node-version: "current" + node-version: '16.x' # Specify LTS version for consistency + - name: Set up Rust toolchain uses: actions-rs/toolchain@v1 with: toolchain: stable override: true + - name: Cache Rust dependencies and CLI tool - uses: Swatinem/rust-cache@v2.7.3 - with: - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - cache-targets: true # Caches both ~/.cargo and the target directory - - name: "Cache cargo" id: cache-cargo - uses: "actions/cache@v4" + uses: actions/cache@v4 with: path: | ~/.cargo/bin/ @@ -43,22 +42,19 @@ jobs: ~/.cargo/git/db/ target/ save-always: true - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - restore-keys: ${{ runner.os }}-cargo- - - - name: Install nj-cli - run: cargo install nj-cli + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock', 'cli/**') }} + restore-keys: | + ${{ runner.os }}-cargo- - - name: enable corepack for yarnpkg upgrade - run: corepack enable + - name: Install Rust CLI tools + run: | + cargo install nj-cli + curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh - name: Install Build CLI tool if: steps.cache-cargo.outputs.cache-hit != 'true' run: cargo install --path=cli - - name: install wasm-pack - run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh - - name: JS/TS linting run: cargo chipmunk lint shared wrapper client app -u print