1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-10-27 07:25:48 -04:00

have CI run linters on every PR, bump eslint

This commit is contained in:
2020-07-03 17:35:39 -04:00
parent e2b9099996
commit e10c3a10f7
3 changed files with 15 additions and 11 deletions

View File

@@ -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 }}