build(deps-dev): bump all #2064
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: Checkout | |
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | |
- name: Setup node | |
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 | |
- name: Setup Ruby, JRuby, and TruffleRuby | |
uses: ruby/setup-ruby@c04af2bb7258bb6a03df1d3c1865998ac9390972 # v1.194.0 | |
- name: Install | |
run: | | |
corepack enable | |
corepack prepare pnpm@latest --activate | |
pnpm install | |
gem install bundler && bundle config set --local path 'vendor/bundle' | |
bundle install | |
# 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: | | |
css: | |
- '**/*.css' | |
js: | |
- '**/**.?(c|m)js' | |
# json: | |
# - '**/**.json?(5|c)' | |
# - 'OWNERS.json5' | |
md: | |
- '**/**.md' | |
svg: | |
- '**/*.svg' | |
toml: | |
- '**/**.t?(o)ml' | |
ts: | |
- '**/**.?(c|m)ts' | |
- '**/*.d.?(c|m)ts' | |
yaml: | |
- '**/**.y?(a)ml' | |
# 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 CSS | |
if: ${{ steps.filter.outputs.css == 'true' }} | |
run: pnpm exec nps verify.css | |
- name: Verify JavaScript | |
if: ${{ steps.filter.outputs.js == 'true' }} | |
run: pnpm exec nps verify.js | |
- name: Verify JSON | |
if: ${{ steps.filter.outputs.json == 'true' }} | |
run: pnpm exec nps verify.json | |
- name: Verify Markdown | |
if: ${{ steps.filter.outputs.md == 'true' }} | |
run: pnpm exec nps verify.md | |
- name: Verify SVG | |
if: ${{ steps.filter.outputs.svg == 'true' }} | |
run: pnpm exec nps verify.svg | |
- name: Verify TOML | |
if: ${{ steps.filter.outputs.toml == 'true' }} | |
run: pnpm exec nps verify.toml | |
- name: Verify TypeScript | |
if: ${{ steps.filter.outputs.ts == 'true' }} | |
run: pnpm exec nps verify.ts | |
- name: Verify YAML | |
if: ${{ steps.filter.outputs.yaml == 'true' }} | |
run: pnpm exec nps verify.yaml | |
# Only run tests if the PR touches behavior-related files. | |
- name: Test | |
if: ${{ steps.filter.outputs.js == 'true' || | |
steps.filter.outputs.json == 'true' || | |
steps.filter.outputs.ts == 'true' }} | |
run: pnpm test |