From 8635f5a9b287e635f03a3b1bb800527f7ae21ecf Mon Sep 17 00:00:00 2001 From: TheAfroOfDoom Date: Fri, 29 Dec 2023 05:40:47 -0500 Subject: [PATCH] add eslint to github workflow - convert to using `yarn` directly to run prettier too with dependency caching maybe --- .github/workflows/scripts.yml | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/.github/workflows/scripts.yml b/.github/workflows/scripts.yml index 74bc96f66..7804f7902 100644 --- a/.github/workflows/scripts.yml +++ b/.github/workflows/scripts.yml @@ -7,14 +7,35 @@ on: - main jobs: - prettier: + format: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - name: Install Yarn 3.6.3 + run: corepack enable + - name: Setup cache + uses: actions/setup-node@v4 + with: + cache: 'yarn' + cache-dependency-path: yarn.lock + node-version-file: package.json + - run: yarn - name: Run Prettier - uses: creyD/prettier_action@v4.3 + run: yarn start lint.prettier.check + + lint: + runs-on: ubuntu-latest + needs: format + steps: + - uses: actions/checkout@v4 + - name: Install Yarn 3.6.3 + run: corepack enable + - name: Setup cache + uses: actions/setup-node@v4 with: - dry: True - prettier_options: '--check .' - prettier_version: 3.1.1 + cache: 'yarn' + cache-dependency-path: yarn.lock + node-version-file: package.json + - run: yarn + - name: Run ESLint + run: yarn start lint.eslint.check