Skip to content

build(deps-dev): bump % [email protected]

build(deps-dev): bump % [email protected] #3436

Workflow file for this run

name: Lint and test
# By default, runs when a pull request is opened, synchronized, or reopened.
on: pull_request
jobs:
lint_and_test:
name: Lint and test
runs-on: ubuntu-latest
steps:
- name: Check out project repository
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Set up Node.js runtime
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version-file: 'package.json'
- name: Install
run: |
corepack enable
corepack prepare pnpm@latest --activate
pnpm install
echo "$(pwd)/node_modules/.bin" >> $GITHUB_PATH
- name: Build
run: nps build
# Checks to see if any files in the PR match one of the listed file types.
# We can use this filter to decide whether or not to run linters or tests.
# You can check if a file with a listed file type is in the PR by doing:
# if: ${{ steps.filter.outputs.md == 'true' }}
# This will return true if there's a Markdown file the PR has changed.
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: filter
with:
filters: |
scss:
- '**/*.scss'
browserslist:
- '.browserslistrc'
dockerfile:
- '**/Dockerfile'
html:
- '**/*.html'
ts:
- '**/*.ts'
- '**/*.mts'
json:
- '**/*.json'
- '**/*.json5'
- '**/*.jsonc'
md:
- '**/*.md'
svg:
- '**/*.svg'
toml:
- '**/*.toml'
yaml:
- '**/*.yml'
- '**/*.yaml'
# Use the filter to check if files with a specific file type were changed
# in the PR. If they were, run the relevant linters. Otherwise, skip.
- name: Verify SCSS
if: ${{ steps.filter.outputs.scss == 'true' }}
run: nps verify.scss
- name: Verify Browserslist
if: ${{ steps.filter.outputs.browserslist == 'true' }}
run: nps verify.browserslist
- name: Verify Dockerfile
if: ${{ steps.filter.outputs.dockerfile == 'true' }}
run: nps verify.dockerfile
- name: Verify HTML
if: ${{ steps.filter.outputs.html == 'true' }}
run: nps verify.html
- name: Verify TypeScript
if: ${{ steps.filter.outputs.ts == 'true' || steps.filter.outputs.json == 'true' }}
run: nps verify.ts
- name: Verify JSON
if: ${{ steps.filter.outputs.json == 'true' }}
run: nps verify.json
- name: Verify Markdown
if: ${{ steps.filter.outputs.md == 'true' }}
run: nps verify.md
- name: Verify SVG
if: ${{ steps.filter.outputs.svg == 'true' }}
run: nps verify.svg
- name: Verify TOML
if: ${{ steps.filter.outputs.toml == 'true' }}
run: nps verify.toml
- name: Verify YAML
if: ${{ steps.filter.outputs.yaml == 'true' }}
run: nps verify.yaml
# Only run tests if the PR touches behavior-related files.
- name: Test
if: ${{ steps.filter.outputs.ts == 'true' || steps.filter.outputs.json == 'true' }}
run: nps test