From ae083df5113af723dbf87bde29469148ea18b9d9 Mon Sep 17 00:00:00 2001 From: sehyunc <41171808+sehyunc@users.noreply.github.com> Date: Wed, 4 Sep 2024 19:25:50 -0700 Subject: [PATCH] s --- .github/workflows/code-quality.yml | 83 ++++++++++++++------------- .github/workflows/lint-and-format.yml | 1 - 2 files changed, 44 insertions(+), 40 deletions(-) delete mode 100644 .github/workflows/lint-and-format.yml diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index eb60d464..b7773653 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -12,42 +12,47 @@ jobs: contents: read steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - - uses: actions/setup-node@v4 - with: - node-version: '20' - registry-url: 'https://registry.npmjs.org' - - - uses: pnpm/action-setup@v2 - with: - version: 9.1.4 - - - name: Cache dependencies - uses: actions/cache@v3 - with: - path: ~/.pnpm-store - key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm- - - - name: Create .npmrc - run: | - echo "registry=https://registry.npmjs.org" > .npmrc - echo "@renegade-fi:registry=https://registry.npmjs.org" >> .npmrc - echo "@renegade-fi/tradingview-charts:registry=https://npm.pkg.github.com" >> .npmrc - echo "//npm.pkg.github.com/:_authToken=${{ secrets.PKG_GITHUB_TOKEN }}" >> .npmrc - - - name: Install dependencies - run: pnpm install --frozen-lockfile - env: - NODE_AUTH_TOKEN: ${{ secrets.PKG_GITHUB_TOKEN }} - - - name: Run linting, formatting check, and type checking - run: | - pnpm run lint & - pnpm prettier --check . & - pnpm run typecheck & - wait \ No newline at end of file + - uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - uses: actions/setup-node@v4 + with: + node-version: "20" + registry-url: "https://registry.npmjs.org" + + - uses: pnpm/action-setup@v2 + with: + version: 9.1.4 + + - name: Get pnpm store directory + id: pnpm-cache + run: | + echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT + + - name: Cache dependencies + uses: actions/cache@v3 + with: + path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Create .npmrc + run: | + echo "registry=https://registry.npmjs.org" > .npmrc + echo "@renegade-fi:registry=https://registry.npmjs.org" >> .npmrc + echo "@renegade-fi/tradingview-charts:registry=https://npm.pkg.github.com" >> .npmrc + echo "//npm.pkg.github.com/:_authToken=${{ secrets.PKG_GITHUB_TOKEN }}" >> .npmrc + + - name: Install dependencies + run: pnpm install --frozen-lockfile + env: + NODE_AUTH_TOKEN: ${{ secrets.PKG_GITHUB_TOKEN }} + + - name: Run linting, formatting check, and type checking + run: | + pnpm run lint & + pnpm prettier --check . & + pnpm run typecheck & + wait diff --git a/.github/workflows/lint-and-format.yml b/.github/workflows/lint-and-format.yml deleted file mode 100644 index 0519ecba..00000000 --- a/.github/workflows/lint-and-format.yml +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file