diff options
| author | Leitwolf11 | 2026-09-28 01:10:53 +0300 |
|---|---|---|
| committer | Leitwolf11 | 2026-09-28 01:10:53 +0300 |
| commit | 252ca8eae71faf1e4e4d00dc7a0489998df12f04 (patch) | |
| tree | a84a3b6bfe6ab817bc8f433b94a100c2e3f477a9 /.github | |
| parent | b38ddd55913442da31b6277724a391af2bcc77bc (diff) | |
| download | website-252ca8eae71faf1e4e4d00dc7a0489998df12f04.tar.gz | |
Pin website dependencies and isolate Codecov credentials
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/ci.yml | 77 | ||||
| -rw-r--r-- | .github/workflows/codeql.yml | 13 |
2 files changed, 66 insertions, 24 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 91eeeea..ce6e207 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,6 @@ on: permissions: contents: read - id-token: write concurrency: group: website-${{ github.ref }} @@ -21,26 +20,26 @@ jobs: runs-on: windows-latest timeout-minutes: 15 steps: - - uses: actions/checkout@v7 - - uses: actions/setup-node@v7 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version: 24 cache: npm cache-dependency-path: frontend/package-lock.json - run: npm ci working-directory: frontend - - run: npm audit --audit-level=high + - run: npm audit --audit-level=moderate working-directory: frontend - run: npm run check working-directory: frontend - run: npm run test:coverage working-directory: frontend - - uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 + - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: - use_oidc: true - files: frontend/coverage/lcov.info - flags: website-frontend - fail_ci_if_error: true + name: website-frontend-coverage + path: frontend/coverage/lcov.info + if-no-files-found: error + retention-days: 1 - run: npm run format:check working-directory: frontend - run: npm run build @@ -50,21 +49,65 @@ jobs: runs-on: macos-latest timeout-minutes: 25 steps: - - uses: actions/checkout@v7 - - uses: actions/setup-java@v6 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1 with: distribution: temurin - java-version: '25' - - uses: gradle/actions/setup-gradle@v6 + java-version: "25" + - uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0 with: - gradle-version: '9.6.0' + gradle-version: "9.6.0" cache-provider: basic - run: gradle test jacocoTestReport bootJar --no-daemon working-directory: backend + - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: website-backend-coverage + path: backend/build/reports/jacoco/test/jacocoTestReport.xml + if-no-files-found: error + retention-days: 1 + + frontend-coverage: + # Fork PRs cannot receive the OIDC token required for Codecov uploads. + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository + needs: frontend + runs-on: ubuntu-latest + timeout-minutes: 10 + permissions: + contents: read + id-token: write + steps: + # Keep OIDC-capable jobs isolated from package install/build scripts. + - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + name: website-frontend-coverage + path: coverage/frontend + - uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 + with: + use_oidc: true + files: coverage/frontend/lcov.info + flags: website-frontend + fail_ci_if_error: true + + backend-coverage: + # Fork PRs cannot receive the OIDC token required for Codecov uploads. + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository + needs: backend + runs-on: ubuntu-latest + timeout-minutes: 10 + permissions: + contents: read + id-token: write + steps: + # Keep OIDC-capable jobs isolated from Gradle build scripts. + - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + name: website-backend-coverage + path: coverage/backend - uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 with: use_oidc: true - files: backend/build/reports/jacoco/test/jacocoTestReport.xml + files: coverage/backend/jacocoTestReport.xml flags: website-backend fail_ci_if_error: true @@ -73,5 +116,5 @@ jobs: runs-on: windows-latest timeout-minutes: 10 steps: - - uses: actions/checkout@v7 - - uses: actions/dependency-review-action@v4 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: actions/dependency-review-action@2031cfc080254a8a887f58cffee85186f0e49e48 # v4.9.0 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 2088ed7..0b29f44 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -7,7 +7,7 @@ on: branches: [main] pull_request: schedule: - - cron: '43 4 * * 1' + - cron: "43 4 * * 1" permissions: actions: read contents: read @@ -28,16 +28,16 @@ jobs: - language: java-kotlin build_mode: manual steps: - - uses: actions/checkout@v7 - - uses: actions/setup-java@v6 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1 if: matrix.language == 'java-kotlin' with: distribution: temurin - java-version: '25' - - uses: gradle/actions/setup-gradle@v6 + java-version: "25" + - uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0 if: matrix.language == 'java-kotlin' with: - gradle-version: '9.6.0' + gradle-version: "9.6.0" - uses: github/codeql-action/init@7999b86c43a865dc79d8923397f35af22de63401 # v4 with: languages: ${{ matrix.language }} @@ -51,4 +51,3 @@ jobs: - uses: github/codeql-action/analyze@7999b86c43a865dc79d8923397f35af22de63401 # v4 with: category: /language:${{ matrix.language }} - |