This repository has been archived by the owner on Apr 18, 2024. It is now read-only.
Repository is deprecated (#311) #721
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint Code Base | |
on: | |
push: | |
branches: | |
- master | |
- 'lse-release/**' | |
- 'ls-release/**' | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
- ready_for_review | |
branches: | |
- master | |
- 'lse-release/**' | |
- 'ls-release/**' | |
env: | |
NODE: 18 | |
CACHE_NAME_PREFIX: v1 | |
jobs: | |
run-lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "${{ env.NODE }}" | |
- name: Upgrade Yarn | |
run: npm install -g yarn@1.22 | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | |
- name: Configure yarn cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ env.CACHE_NAME_PREFIX }}-${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/yarn.lock') }} | |
- name: Print Yarn cache size | |
run: du -d 0 -h ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
- name: Lint | |
run: yarn install --frozen-lockfile && yarn lint |