Skip to content

add vscode extenstion #3

add vscode extenstion

add vscode extenstion #3

Workflow file for this run

# Unique name for this workflow
name: CI
# Definition when the workflow should run
on:
workflow_dispatch:
push:
branches:
- main
# 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