fix code #8
This file contains hidden or 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 | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: 1.21.x | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 8 | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Backend unit tests (coverage) | |
| run: pnpm test:backend:coverage | |
| - name: Frontend unit tests (coverage) | |
| run: pnpm test:frontend:coverage | |
| - name: E2E tests (skipped by default) | |
| run: RUN_E2E=0 pnpm test:e2e || true | |
| - name: Upload coverage artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage | |
| path: coverage | |
| - name: Upload test reports | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-reports | |
| path: test-reports | |
| - name: Setup Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '17' | |
| - name: Java tests with coverage | |
| run: mvn -q -B test -Pcoverage | |
| - name: Go tests with coverage (operator) | |
| run: | | |
| cd operator | |
| go test ./... -v -coverprofile=coverage.out || true | |
| cd - | |
| - name: Upload Go coverage | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: go-coverage | |
| path: operator/coverage.out | |
| - name: Install Playwright browsers | |
| run: pnpm playwright:install | |
| - name: Run Playwright tests | |
| run: pnpm test:playwright | |
| - name: Upload Playwright report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-report | |
| path: playwright-report | |
| - name: Upload JaCoCo reports | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: jacoco-reports | |
| path: target/site/ | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 8 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: pnpm | |
| - name: Install | |
| run: pnpm i | |
| - name: Lint | |
| run: pnpm run lint | |
| # build: | |
| # runs-on: ${{ matrix.os }} | |
| # | |
| # timeout-minutes: 10 | |
| # | |
| # strategy: | |
| # matrix: | |
| # node_version: [16.x, 18.x, 20.x] | |
| # # os: [ubuntu-latest, windows-latest, macos-latest] | |
| # os: [macos-latest] | |
| # fail-fast: false | |
| # | |
| # steps: | |
| # - uses: actions/checkout@v3 | |
| # | |
| # - name: Install pnpm | |
| # uses: pnpm/[email protected] | |
| # | |
| # - name: Set node version to ${{ matrix.node_version }} | |
| # uses: actions/setup-node@v3 | |
| # with: | |
| # node-version: ${{ matrix.node_version }} | |
| # cache: pnpm | |
| # | |
| # - name: Install | |
| # run: pnpm i | |
| # | |
| # - name: Build | |
| # run: pnpm run build | |
| # | |
| # - name: check | |
| # run: ls dist/electron |