From e10c3a10f7a590080540449159c1c06a522c3b2a Mon Sep 17 00:00:00 2001 From: Jake Jarvis Date: Fri, 3 Jul 2020 17:35:39 -0400 Subject: [PATCH] have CI run linters on every PR, bump eslint --- .github/workflows/ci.yml | 16 ++++++++++------ package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 69d39aac..e82377fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,14 +12,16 @@ jobs: # "[skip ci]" also causes Netlify to skip, so these are automatically in harmony # https://docs.netlify.com/site-deploys/manage-deploys/#skip-a-deploy if: "!contains(github.event.head_commit.message, '[skip ci]')" + timeout-minutes: 10 env: NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} steps: - name: Wait for Netlify + # installing via `npx` each run takes a long time, but deploys always take longer run: npx netlify-cli watch - lighthouse: + audit: runs-on: ubuntu-latest needs: deploy env: @@ -56,9 +58,9 @@ jobs: name: lhci-results path: ./.lighthouseci - percy: + lint: runs-on: ubuntu-latest - if: "!contains(github.actor, '[bot]') && !contains(github.event.head_commit.message, '[skip ci]')" + if: "!contains(github.event.head_commit.message, '[skip ci]')" steps: - uses: actions/checkout@v2 with: @@ -70,9 +72,9 @@ jobs: - uses: actions/setup-go@v2 with: go-version: 1.14.x - # https://github.com/actions/cache/blob/master/examples.md#node---yarn - # https://github.com/actions/cache/issues/60 - name: Get yarn cache location + # https://github.com/actions/cache/blob/master/examples.md#node---yarn + # https://github.com/actions/cache/issues/60 id: yarn-cache run: echo "::set-output name=dir::$(yarn cache dir)" - name: Cache dependencies @@ -85,11 +87,13 @@ jobs: - name: Install deps run: yarn install --no-ignore-optional --frozen-lockfile - name: Lint - continue-on-error: true run: yarn lint - name: Build run: yarn build:preview - name: Percy snapshots + # don't run for all of dependabot's PRs -- I'm using the free plan... + if: "!contains(github.actor, '[bot]')" uses: percy/snapshot-action@v0.1.0 + timeout-minutes: 10 env: PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }} diff --git a/package.json b/package.json index 68027951..be565d92 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "devDependencies": { "autoprefixer": "^9.8.4", "cross-env": "^7.0.2", - "eslint": "~7.3.1", + "eslint": "~7.4.0", "eslint-config-prettier": "~6.11.0", "eslint-plugin-prettier": "~3.1.4", "gifsicle": "jakejarvis/gifsicle-bin#master", diff --git a/yarn.lock b/yarn.lock index 539fad10..264c4842 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1359,10 +1359,10 @@ eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.2.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== -eslint@~7.3.1: - version "7.3.1" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.3.1.tgz#76392bd7e44468d046149ba128d1566c59acbe19" - integrity sha512-cQC/xj9bhWUcyi/RuMbRtC3I0eW8MH0jhRELSvpKYkWep3C6YZ2OkvcvJVUeO6gcunABmzptbXBuDoXsjHmfTA== +eslint@~7.4.0: + version "7.4.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.4.0.tgz#4e35a2697e6c1972f9d6ef2b690ad319f80f206f" + integrity sha512-gU+lxhlPHu45H3JkEGgYhWhkR9wLHHEXC9FbWFnTlEkbKyZKWgWRLgf61E8zWmBuI6g5xKBph9ltg3NtZMVF8g== dependencies: "@babel/code-frame" "^7.0.0" ajv "^6.10.0"