name: ci on: push: pull_request: workflow_dispatch: inputs: run_e2e: description: "运行浏览器冒烟" required: false default: "false" jobs: build-test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-java@v4 with: distribution: temurin java-version: "21" cache: maven - name: Backend unit tests working-directory: backend run: | chmod +x mvnw ./mvnw -q test - name: Backend integration tests working-directory: backend run: ./mvnw -q failsafe:integration-test failsafe:verify - uses: actions/setup-node@v4 with: node-version: "22" cache: npm cache-dependency-path: frontend/package-lock.json - name: Frontend build working-directory: frontend run: | npm ci npm run build - name: OpenAPI validation working-directory: tests/contract run: | npm ci npm run validate - name: Docker image build run: | docker build -f deploy/backend.Dockerfile -t organization-people-platform-backend . docker build -f deploy/frontend.Dockerfile -t organization-people-platform-frontend . - name: E2E smoke if: github.event_name == 'workflow_dispatch' && github.event.inputs.run_e2e == 'true' run: | chmod +x scripts/*.sh scripts/dev-up.sh cd tests/e2e npm ci npx playwright install --with-deps chromium npm test