From 91c40022764e85d3187946271c5124b92baf766c Mon Sep 17 00:00:00 2001 From: realaravinth Date: Thu, 14 Oct 2021 20:03:47 +0530 Subject: [PATCH] CI: lint frontend and cache linting workflows --- .github/workflows/clippy-fmt.yml | 41 ++++++++++++++++++++++++++++++++ .github/workflows/coverage.yml | 1 + .github/workflows/linux.yml | 1 + 3 files changed, 43 insertions(+) diff --git a/.github/workflows/clippy-fmt.yml b/.github/workflows/clippy-fmt.yml index 325e539..61fcb1b 100644 --- a/.github/workflows/clippy-fmt.yml +++ b/.github/workflows/clippy-fmt.yml @@ -11,6 +11,16 @@ jobs: fmt: runs-on: ubuntu-latest steps: + - name: ⚡ Cache + uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + node_modules/ + target + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + - uses: actions/checkout@v2 - name: Install Rust @@ -27,6 +37,16 @@ jobs: clippy: runs-on: ubuntu-latest steps: + - name: ⚡ Cache + uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + node_modules/ + target + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + - uses: actions/checkout@v2 - name: Install Rust @@ -41,3 +61,24 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} args: --workspace --tests --all-features + + eslint: + runs-on: ubuntu-latest + steps: + - name: ⚡ Cache + uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + node_modules/ + target + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + + - uses: actions/checkout@v2 + + - name: build frtontend + run: make frontend + + - name: lint frontend + run: yarn lint diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 4564e37..e06b003 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -42,6 +42,7 @@ jobs: path: | ~/.cargo/registry ~/.cargo/git + node_modules/ target key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index f34e355..7c59b22 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -43,6 +43,7 @@ jobs: path: | ~/.cargo/registry ~/.cargo/git + node_modules/ target key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}