Skip to content

Add the “expirable items" infrastructure #10115

Add the “expirable items" infrastructure

Add the “expirable items" infrastructure #10115

name: Code Linting and JS Tests
on:
push:
branches:
- develop
- main
# Only run if CSS/JS/MD-related files changed.
paths:
- '.github/workflows/js-css-lint-test.yml'
- '**.js'
- '**.json'
- '**.scss'
- '.eslint*'
- '.nvmrc'
- '.stylelint*'
- '**/package.json'
- 'package-lock.json'
- '!feature-flags.json'
- '!composer.json'
pull_request:
branches:
- develop
- main
- 'feature/**'
# Only run if CSS/JS/MD-related files changed.
paths:
- '.github/workflows/js-css-lint-test.yml'
- '**.js'
- '**.json'
- '**.scss'
- '.eslint*'
- '.nvmrc'
- '.stylelint*'
- '**/package.json'
- 'package-lock.json'
- '!feature-flags.json'
- '!composer.json'
types:
- opened
- reopened
- synchronize
concurrency:
group: js-css-lint-test-${{ github.ref }}
cancel-in-progress: true
jobs:
js-css-lint-test:
name: JS + CSS
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- name: Setup Node.js (.nvmrc)
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: npm install
run: npm ci
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
- name: CSS Lint
run: npm run lint:css
- name: JS Lint
run: npm run lint:js
- name: Jest Tests
run: npm run test:js