From 78263185a1b4df3a03294e7adf94a27a587f5b8f Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Tue, 8 Apr 2025 20:31:42 +0530 Subject: [PATCH] chore: cached pip for linters --- .github/workflows/linters.yml | 28 ++++++++++++++++++++++++ frontend/src/components/UserDropdown.vue | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 018ee5e7..5a6fae49 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -7,6 +7,25 @@ on: branches: [ main ] jobs: + commit-lint: + name: 'Semantic Commits' + runs-on: ubuntu-latest + if: github.event_name == 'pull_request' + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 200 + - uses: actions/setup-node@v4 + with: + node-version: 20 + check-latest: true + + - name: Check commit titles + run: | + npm install @commitlint/cli @commitlint/config-conventional + npx commitlint --verbose --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} + linters: name: Semantic Commits runs-on: ubuntu-latest @@ -20,6 +39,15 @@ jobs: with: python-version: '3.10' + - name: Cache pip + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt', '**/pyproject.toml', '**/setup.py') }} + restore-keys: | + ${{ runner.os }}-pip- + ${{ runner.os }}- + - name: Install and Run Pre-commit uses: pre-commit/action@v2.0.3 diff --git a/frontend/src/components/UserDropdown.vue b/frontend/src/components/UserDropdown.vue index 7a326682..072bd942 100644 --- a/frontend/src/components/UserDropdown.vue +++ b/frontend/src/components/UserDropdown.vue @@ -36,7 +36,7 @@ Learning
{{ convertToTitleCase(userResource.data?.full_name) }}