From 668fefcc33300a497cea37557c858b617eaf2c35 Mon Sep 17 00:00:00 2001 From: Rafael Cardenas Date: Thu, 27 Jun 2024 15:06:15 -0600 Subject: [PATCH] fix: lint --- .github/workflows/ci.yml | 42 +++++++++++++++++++++++++++++++++++++--- README.md | 1 + 2 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 README.md diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 573fca2..ac6c614 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,10 +14,46 @@ concurrency: group: ${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }} cancel-in-progress: true -# env: -# DOCKER_IMAGE: hirosystems/${{ github.event.repository.name }} - jobs: + api-lint: + runs-on: ubuntu-latest + defaults: + run: + working-directory: api + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + + - name: Cache node modules + uses: actions/cache@v4 + env: + cache-name: cache-node-modules + with: + path: | + ~/.npm + **/node_modules + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Install deps + run: npm ci --audit=false + + - name: Lint ESLint + run: npm run lint:eslint + + - name: Lint Prettier + run: npm run lint:prettier + + - name: Lint Unused Exports + run: npm run lint:unused-exports + runehook-test: runs-on: ubuntu-latest steps: diff --git a/README.md b/README.md new file mode 100644 index 0000000..cfd8d5d --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# Runehook