Skip to content

feat(template): 添加我的模板列表和模板可见性切换功能,更新数据库结构以支持可见性字段 #14

feat(template): 添加我的模板列表和模板可见性切换功能,更新数据库结构以支持可见性字段

feat(template): 添加我的模板列表和模板可见性切换功能,更新数据库结构以支持可见性字段 #14

Workflow file for this run

name: CI
on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]
jobs:
backend-test:
name: Backend Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
- name: Build and Test
run: mvn clean test
working-directory: ./codestyle-admin
- name: Upload coverage reports
uses: codecov/codecov-action@v3
if: success()
with:
files: ./codestyle-admin/target/site/jacoco/jacoco.xml
flags: backend
frontend-test:
name: Frontend Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 10
- name: Install dependencies
run: pnpm install
working-directory: ./codestyle-admin-web
- name: Lint check
run: pnpm lint
working-directory: ./codestyle-admin-web
- name: Type check
run: pnpm typecheck
working-directory: ./codestyle-admin-web
- name: Build
run: pnpm build
working-directory: ./codestyle-admin-web
code-quality:
name: Code Quality Check
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
- name: Cache SonarCloud packages
uses: actions/cache@v3
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
-Dsonar.projectKey=codestyle-team_codestyle \
-Dsonar.organization=codestyle-team \
-Dsonar.host.url=https://sonarcloud.io
working-directory: ./codestyle-admin
if: env.SONAR_TOKEN != ''