From a599ddbfc10978e47417add7f42caefa8acd33e8 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Mon, 4 Mar 2024 15:58:16 +0530 Subject: [PATCH] Cache --- .github/workflows/auth-lint.yml | 16 ++++++++++------ .github/workflows/mobile-lint.yml | 16 ++++++++++------ .github/workflows/web-lint.yml | 8 ++++++-- 3 files changed, 26 insertions(+), 14 deletions(-) diff --git a/.github/workflows/auth-lint.yml b/.github/workflows/auth-lint.yml index bf740d5c76..1026f0066b 100644 --- a/.github/workflows/auth-lint.yml +++ b/.github/workflows/auth-lint.yml @@ -6,8 +6,8 @@ on: paths: # - But only if something changes inside auth - "auth/**" - # - Or if the there is some change in GitHub workflows themselves - - ".github/workflows/**" + # - Or if the there is some change in workflow itself + - ".github/workflows/auth-lint.yml" jobs: lint: @@ -16,16 +16,20 @@ jobs: run: working-directory: auth steps: + # Checkout our code, including submodules + - uses: actions/checkout@v4 + with: + submodules: recursive + # Install Flutter - uses: subosito/flutter-action@v2 with: channel: "stable" flutter-version: "3.13.4" - # Checkout our code, including submodules - - uses: actions/checkout@v4 - with: - submodules: recursive + cache: true + # Install dependencies - run: flutter pub get + # Lint - run: flutter analyze --no-fatal-infos diff --git a/.github/workflows/mobile-lint.yml b/.github/workflows/mobile-lint.yml index 577bdca5f1..e1ff20ded2 100644 --- a/.github/workflows/mobile-lint.yml +++ b/.github/workflows/mobile-lint.yml @@ -6,8 +6,8 @@ on: paths: # - But only if something changes inside mobile - "mobile/**" - # - Or if the there is some change in GitHub workflows themselves - - ".github/workflows/**" + # - Or if the there is some change in workflow itself + - ".github/workflows/mobile-lint.yml" jobs: lint: @@ -16,16 +16,20 @@ jobs: run: working-directory: mobile steps: + # Checkout our code, including submodules + - uses: actions/checkout@v4 + with: + submodules: recursive + # Install Flutter - uses: subosito/flutter-action@v2 with: channel: "stable" flutter-version: "3.13.4" - # Checkout our code, including submodules - - uses: actions/checkout@v4 - with: - submodules: recursive + cache: true + # Install dependencies - run: flutter pub get + # Lint - run: flutter analyze --no-fatal-infos diff --git a/.github/workflows/web-lint.yml b/.github/workflows/web-lint.yml index 8154c79553..3f6c95ccc7 100644 --- a/.github/workflows/web-lint.yml +++ b/.github/workflows/web-lint.yml @@ -6,8 +6,8 @@ on: paths: # - But only if something changes inside web - "web/**" - # - Or if the there is some change in GitHub workflows themselves - - ".github/workflows/**" + # - Or if the there is some change in workflow itself + - ".github/workflows/mobile-lint.yml" jobs: lint: @@ -17,5 +17,9 @@ jobs: working-directory: web steps: - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: true - run: yarn install - run: yarn lint