Skip to content

generate description fe #148

generate description fe

generate description fe #148

name: pr_check_web_wiki
on:
pull_request:
branches:
- main
paths:
- "web/wiki/**"
jobs:
pr_check_web_wiki:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check package.json version
run: ./scripts/check_version.sh web/wiki/package.json
shell: bash
- name: Check CHANGELOG.md has been updated
run: ./scripts/check_changelog.sh web/wiki/CHANGELOG.md
shell: bash
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "18"
cache: "npm"
cache-dependency-path: web/wiki/package-lock.json
- name: Cache Node.js modules
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/web/wiki/node_modules
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-
- name: install dependencies
run: |
cd ${{ github.workspace }}/web/wiki
npm ci --legacy-peer-deps
- name: lint
run: |
cd ${{ github.workspace }}/web/wiki
npx eslint src --max-warnings 0
- name: test
run: |
cd ${{ github.workspace }}/web/wiki
npm run test -- --coverage
- name: build
run: |
cd ${{ github.workspace }}/web/wiki
npm run build
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
with:
projectBaseDir: web/wiki
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}