fix(deps): upgrade devDependencies (minor) #1434
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: CI Checks | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: [opened, synchronize, reopened] | |
# | |
# Limit workflow to a single running instance at a time | |
# | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
# | |
# Ensure all files pass linting | |
# | |
lint: | |
name: Prettier, ESLint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎 | |
uses: actions/checkout@v4 | |
- name: Setup Node 🏗 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
cache: 'npm' | |
- name: Install Node Modules 🔧 | |
run: | | |
npm install | |
- name: Lint 🔎 | |
run: npm run lint | |
# | |
# Ensure the package builds properly | |
# | |
build: | |
name: Build package | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎 | |
uses: actions/checkout@v4 | |
- name: Setup Node 🏗 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
cache: 'npm' | |
- name: Install Node Modules 🔧 | |
run: npm install | |
- name: Build 🔨 | |
run: | | |
npm run build | |
npm run bundle | |
# | |
# Ensure all unit tests pass | |
# | |
test: | |
name: Unit tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎 | |
uses: actions/checkout@v4 | |
- name: Setup Node 🏗 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
cache: 'npm' | |
- name: Install Node Modules 🔧 | |
run: npm install | |
- name: Test 🧪 | |
run: npm run test | |
- name: Upload test coverage reports 🛫 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-coverage | |
path: '**/.test-coverage/lcov.info' | |
include-hidden-files: true | |
# | |
# Check code quality and test coverage | |
# | |
sonarcloud: | |
name: SonarCloud | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- name: Checkout 🛎 | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Disable shallow clones for better relevancy of analysis | |
- name: Download test coverage reports 🛬 | |
uses: actions/download-artifact@v4 | |
with: | |
name: test-coverage | |
- name: SonarCloud scan 🔎 | |
uses: SonarSource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |