Skip to content

chore(deps): update dependency eslint-plugin-jsonc to v3 - autoclosed #376

chore(deps): update dependency eslint-plugin-jsonc to v3 - autoclosed

chore(deps): update dependency eslint-plugin-jsonc to v3 - autoclosed #376

Workflow file for this run

name: Testing
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22, 24]
steps:
- name: Check out code
uses: actions/checkout@v6
- name: Enable Corepack
run: corepack enable
- name: Use Node LTS version
uses: actions/setup-node@v6
with:
cache: yarn
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: yarn install --immutable
- name: Run test suite
run: yarn test
coverage:
permissions:
pull-requests: write
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [24]
steps:
- uses: actions/checkout@v6
- name: Enable Corepack
run: corepack enable
- uses: actions/setup-node@v6
with:
cache: yarn
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: yarn install --immutable
- name: Run coverage report
run: yarn coverage
- uses: actions/upload-artifact@v7
with:
name: coverage-data-${{ github.run_id }}
path: |
coverage/**/*.json
- name: Coverage summary
uses: irongut/CodeCoverageSummary@v1.3.0
with:
filename: coverage/cobertura-coverage.xml
format: "markdown"
output: "both"
- name: Add coverage PR comment
uses: marocchino/sticky-pull-request-comment@v3.0.2
with:
recreate: true
path: code-coverage-results.md
- name: Write to job summary
run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY
# --- Lint pre-compiled assets for consistency --- #
lint:
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: read
strategy:
matrix:
node-version: [24]
steps:
- name: Check out code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Enable Corepack
run: corepack enable
- name: Use Node LTS version
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: yarn
## --- YARN CACHE --- ##
- name: Check for cached dependencies
continue-on-error: true
id: cache-dependencies
uses: actions/cache@v5
with:
path: |
.cache/yarn
node_modules
key: ubuntu-latest-node${{ matrix.node-version }}-${{ hashFiles('yarn.lock') }}
## --- INSTALL --- ##
# If statement isn't needed here b/c yarn will leverage the cache if it exists
- name: Install dependencies
shell: bash
run: yarn install --immutable
- name: Get changed files
id: changed-files
uses: step-security/changed-files@v47
with:
files_yaml: |
eslint:
- '*.js'
mdlint:
- '*.md'
- '!expected/**'
- '!fixtures/**'
- name: Run eslint
uses: reviewdog/action-eslint@v1.34.0
if: ${{ steps.changed-files.outputs.eslint_added_files != '' || steps.changed-files.outputs.eslint_modified_files != '' }}
with:
fail_level: error
level: error
reporter: github-pr-review
filter_mode: diff_context
# eslint_flags: "components/*/stories/*.js"
eslint_flags: "--config ${{ github.workspace }}/.eslintrc ${{ steps.changed-files.outputs.eslint_added_files }} ${{ steps.changed-files.outputs.eslint_modified_files }}"
- name: Run markdownlint on documentation
uses: reviewdog/action-markdownlint@v0.26.2
if: ${{ steps.changed-files.outputs.mdlint_added_files != '' || steps.changed-files.outputs.mdlint_modified_files != '' }}
with:
reporter: github-pr-review
filter_mode: diff_context
fail_level: error
markdownlint_flags: "--config ${{ github.workspace }}/.markdownlint.json ${{ steps.changed-files.outputs.mdlint_added_files }} ${{ steps.changed-files.outputs.mdlint_modified_files }}"
- name: Run lint
run: yarn lint --fix
# This step will evaluate the repo status and report the change
# If there are changes, capture the changes and upload them as an artifact
- name: Check if there are changes
shell: bash
run: |
if [[ -z $(git status --porcelain) ]]; then
echo "No changes detected"
exit 0
else
echo "Changes detected"
git status
git add .
exit 1
fi