build(deps-dev): bump eslint from 8.44.0 to 8.46.0 #1162
Workflow file for this run
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
# Unique name for this workflow | |
name: CI (PR) | |
# Definition when the workflow should run | |
on: | |
workflow_dispatch: | |
pull_request: | |
types: [opened, edited, synchronize, reopened] | |
# Jobs to be executed | |
jobs: | |
format-lint-lwc-tests: | |
runs-on: trailheadapps-Ubuntu | |
steps: | |
# Checkout the code in the pull request | |
- name: 'Checkout source code' | |
uses: actions/checkout@v3 | |
# Install Volta to enforce proper node and package manager versions | |
- name: 'Install Volta' | |
uses: volta-cli/action@v4 | |
# Cache node_modules to speed up the process | |
- name: 'Restore node_modules cache' | |
id: cache-npm | |
uses: actions/cache@v3 | |
with: | |
path: node_modules | |
key: npm-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
npm-${{ env.cache-name }}- | |
npm- | |
# Install npm dependencies for Prettier and Jest | |
- name: 'Install npm dependencies' | |
if: steps.cache-npm.outputs.cache-hit != 'true' | |
run: HUSKY=0 npm ci | |
# Prettier formatting | |
- name: 'Code formatting verification with Prettier' | |
run: npm run prettier:verify | |
# ESlint | |
- name: 'Lint Lightning Web Components' | |
run: npm run lint | |
# Unit tests | |
- name: 'Unit test Lightning Web Components' | |
run: npm run test:unit:coverage | |
# Upload code coverage data | |
- name: 'Upload code coverage for LWC to Codecov.io' | |
uses: codecov/codecov-action@v3 | |
# Auto merge Dependabot PRs for: | |
# - patch updates on prod dependencies | |
# - minor updates on dev dependencies | |
dependabot-auto-merge: | |
# Only run for Dependabot PRs | |
if: github.actor == 'dependabot[bot]' | |
runs-on: trailheadapps-Ubuntu | |
needs: format-lint-lwc-tests | |
permissions: | |
pull-requests: write | |
contents: write | |
steps: | |
- name: 'Fetch Dependabot metadata' | |
id: dependabot | |
uses: dependabot/fetch-metadata@v1 | |
- name: 'Check auto merge conditions' | |
id: auto-merge | |
if: | | |
( | |
steps.dependabot.outputs.update-type == 'version-update:semver-patch' && | |
contains('direct:production,indirect:production', steps.dependabot.outputs.dependency-type) | |
) || ( | |
contains('version-update:semver-minor,version-update:semver-patch', steps.dependabot.outputs.update-type) && | |
contains('direct:development,indirect:development', steps.dependabot.outputs.dependency-type) | |
) | |
run: echo "::notice ::auto-merge conditions satisfied" | |
- name: 'Approve and merge PR' | |
if: steps.auto-merge.conclusion == 'success' | |
run: | | |
gh pr review --approve "$PR_URL" | |
gh pr merge --auto --rebase "$PR_URL" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
PR_URL: ${{ github.event.pull_request.html_url }} |