Skip to content

Bump @wordpress/viewport from 2.26.3 to 6.33.0 #221

Bump @wordpress/viewport from 2.26.3 to 6.33.0

Bump @wordpress/viewport from 2.26.3 to 6.33.0 #221

name: Lint CSS/JS/MD
on:
push:
# Only run if CSS/JS/MD-related files changed.
paths:
- '**.js'
- '**.cjs'
- '**.css'
- 'packages/**/*.md'
- '.eslint*'
- '.markdownlint*'
- '.nvmrc'
- '.prettier*'
- '.stylelint*'
- '**/package.json'
- 'package-lock.json'
branches:
- main
- release/*
pull_request:
# Only run if CSS/JS/MD-related files changed.
paths:
- '**.js'
- '**.cjs'
- '**.css'
- 'packages/**/*.md'
- '.eslint*'
- '.markdownlint*'
- '.nvmrc'
- '.prettier*'
- '.stylelint*'
- '**/package.json'
- 'package-lock.json'
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Cancel previous
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v2
- name: Read .nvmrc
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
id: nvm
- name: Setup Node
uses: actions/[email protected]
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'
- name: Cache node modules
uses: pat-s/[email protected]
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
env:
cache-name: cache-node-modules
- name: Install dependencies
run: npm ci
env:
CI: true
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
- name: Markdown Lint
run: npm run lint:md
- name: CSS Lint
run: npm run lint:css
- name: JS Lint
run: npm run lint:js
if: >
github.event.pull_request.head.repo.fork == true ||
github.event.pull_request.user.login == 'dependabot[bot]'
- name: JS Lint Report
run: npm run lint:js:report
continue-on-error: true
# Prevent generating the ESLint report if PR is from a fork or authored by Dependabot.
if: >
github.event.pull_request.head.repo.fork == false &&
github.event.pull_request.user.login != 'dependabot[bot]'
- name: Annotate JS Lint Results
uses: ataylorme/[email protected]
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
report-json: 'build/lint-js-report.json'
# The action cannot annotate the PR when run from a PR fork or authored by Dependabot.
if: >
github.event.pull_request.head.repo.fork == false &&
github.event.pull_request.user.login != 'dependabot[bot]'