Skip to content

chore: Upgrades cache action #416

chore: Upgrades cache action

chore: Upgrades cache action #416

Workflow file for this run

name: CI
on:
push:
branches: ['main']
pull_request:
branches: ['main']
jobs:
ci:
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN }}
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: latest
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/[email protected]
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm i --frozen-lockfile
- name: Fix auto-fixable problems
run: pnpm lint
- name: Run tests
run: pnpm test
- 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 }}
- name: Add, commit and push changed files
uses: stefanzweifel/git-auto-commit-action@v4