-
-
Notifications
You must be signed in to change notification settings - Fork 130
Add job timeouts and split cache save/restore in CI workflows #588
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,7 @@ jobs: | |
| codeFormatting: | ||
| name: Code formatting | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Read Node version from mise.toml | ||
|
|
@@ -25,7 +26,7 @@ jobs: | |
| id: yarn-config | ||
| run: echo "cacheFolder=$(yarn config get cacheFolder)" >> "$GITHUB_OUTPUT" | ||
| - name: Restore yarn install cache (node_modules + cacheFolder + install-state) | ||
| uses: actions/cache@v4 | ||
| uses: actions/cache/restore@v4 | ||
| with: | ||
| path: | | ||
| node_modules | ||
|
|
@@ -42,10 +43,24 @@ jobs: | |
| run: | | ||
| case "$(yarn --version)" in 1.*) echo 'expected up-to-date yarn version'; exit 1 ;; esac | ||
| yarn install --immutable | ||
| - name: Save yarn install cache (node_modules + cacheFolder + install-state) | ||
| if: always() | ||
| uses: actions/cache/save@v4 | ||
| with: | ||
| path: | | ||
| node_modules | ||
| ${{ steps.yarn-config.outputs.cacheFolder }} | ||
| .yarn/install-state.gz | ||
| key: | ||
| yarn-${{ runner.os }}-node${{ steps.node.outputs.version }}-${{ hashFiles('yarn.lock') | ||
| }} | ||
| timeout-minutes: 5 | ||
| continue-on-error: true | ||
| - run: yarn format:check | ||
| codeStyles: | ||
| name: Code styles | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Read Node version from mise.toml | ||
|
|
@@ -63,7 +78,7 @@ jobs: | |
| id: yarn-config | ||
| run: echo "cacheFolder=$(yarn config get cacheFolder)" >> "$GITHUB_OUTPUT" | ||
| - name: Restore yarn install cache (node_modules + cacheFolder + install-state) | ||
| uses: actions/cache@v4 | ||
| uses: actions/cache/restore@v4 | ||
| with: | ||
| path: | | ||
| node_modules | ||
|
|
@@ -80,10 +95,24 @@ jobs: | |
| run: | | ||
| case "$(yarn --version)" in 1.*) echo 'expected up-to-date yarn version'; exit 1 ;; esac | ||
| yarn install --immutable | ||
| - name: Save yarn install cache (node_modules + cacheFolder + install-state) | ||
| if: always() | ||
| uses: actions/cache/save@v4 | ||
| with: | ||
| path: | | ||
| node_modules | ||
| ${{ steps.yarn-config.outputs.cacheFolder }} | ||
| .yarn/install-state.gz | ||
| key: | ||
| yarn-${{ runner.os }}-node${{ steps.node.outputs.version }}-${{ hashFiles('yarn.lock') | ||
| }} | ||
| timeout-minutes: 5 | ||
| continue-on-error: true | ||
| - run: yarn lint | ||
| types: | ||
| name: Types check | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Read Node version from mise.toml | ||
|
|
@@ -101,7 +130,7 @@ jobs: | |
| id: yarn-config | ||
| run: echo "cacheFolder=$(yarn config get cacheFolder)" >> "$GITHUB_OUTPUT" | ||
| - name: Restore yarn install cache (node_modules + cacheFolder + install-state) | ||
| uses: actions/cache@v4 | ||
| uses: actions/cache/restore@v4 | ||
| with: | ||
| path: | | ||
| node_modules | ||
|
|
@@ -118,10 +147,24 @@ jobs: | |
| run: | | ||
| case "$(yarn --version)" in 1.*) echo 'expected up-to-date yarn version'; exit 1 ;; esac | ||
| yarn install --immutable | ||
| - name: Save yarn install cache (node_modules + cacheFolder + install-state) | ||
| if: always() | ||
| uses: actions/cache/save@v4 | ||
| with: | ||
| path: | | ||
| node_modules | ||
| ${{ steps.yarn-config.outputs.cacheFolder }} | ||
| .yarn/install-state.gz | ||
| key: | ||
| yarn-${{ runner.os }}-node${{ steps.node.outputs.version }}-${{ hashFiles('yarn.lock') | ||
| }} | ||
| timeout-minutes: 5 | ||
| continue-on-error: true | ||
| - run: yarn typecheck | ||
| tests: | ||
| name: Tests | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Read Node version from mise.toml | ||
|
|
@@ -139,7 +182,7 @@ jobs: | |
| id: yarn-config | ||
| run: echo "cacheFolder=$(yarn config get cacheFolder)" >> "$GITHUB_OUTPUT" | ||
| - name: Restore yarn install cache (node_modules + cacheFolder + install-state) | ||
| uses: actions/cache@v4 | ||
| uses: actions/cache/restore@v4 | ||
| with: | ||
| path: | | ||
| node_modules | ||
|
|
@@ -156,13 +199,27 @@ jobs: | |
| run: | | ||
| case "$(yarn --version)" in 1.*) echo 'expected up-to-date yarn version'; exit 1 ;; esac | ||
| yarn install --immutable | ||
| - name: Save yarn install cache (node_modules + cacheFolder + install-state) | ||
| if: always() | ||
| uses: actions/cache/save@v4 | ||
| with: | ||
| path: | | ||
| node_modules | ||
| ${{ steps.yarn-config.outputs.cacheFolder }} | ||
| .yarn/install-state.gz | ||
| key: | ||
| yarn-${{ runner.os }}-node${{ steps.node.outputs.version }}-${{ hashFiles('yarn.lock') | ||
| }} | ||
| timeout-minutes: 5 | ||
| continue-on-error: true | ||
| - run: yarn test --coverage | ||
| - run: bash <(curl -s https://codecov.io/bash) | ||
| env: | ||
| CODECOV_TOKEN: '2f2eb890-30e2-4724-83eb-7633832cf0de' | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: printf '%s\n' '--- applicable convention files ---'
find /tmp/coderabbit-repo-knowledge/game-ci-documentation-0d982650 -type f -name '*.md' -print
printf '%s\n' '--- workflow context ---'
cat -n .github/workflows/checks.yml | sed -n '195,230p'
printf '%s\n' '--- token references in workflow files ---'
rg -n -C 2 'CODECOV_TOKEN|codecov.io/bash|codecov' .github/workflows
printf '%s\n' '--- scoped conventions and learnings ---'
for f in /tmp/coderabbit-repo-knowledge/game-ci-documentation-0d982650/{*.md,*/.md,*/\*.md}; do
[ -f "$f" ] && { echo "### $f"; cat "$f"; }
doneRepository: game-ci/documentation Length of output: 2445 🏁 Script executed: printf '%s\n' '--- repository learning ---'
cat /tmp/coderabbit-repo-knowledge/game-ci-documentation-0d982650/learnings/docs-03-github-orchestrator.md
printf '%s\n' '--- repository remote ---'
git remote -v
printf '%s\n' '--- repository status summary ---'
git status --shortRepository: game-ci/documentation Length of output: 1015 Sensitive Data Exposure (CWE-798): Use of Hard-coded Credentials Revoke the committed Codecov token. Line 218 exposes a Codecov authentication token. Store a newly generated token in 🧰 Tools🪛 Betterleaks (1.7.3)[high] 218-218: Found a pattern resembling a Codecov Access Token, posing a risk of unauthorized access to code coverage reports and sensitive data. (codecov-access-token) 🪛 zizmor (1.29.0)[warning] 1-281: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block (excessive-permissions) [warning] 164-218: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block (excessive-permissions) 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||
| e2e: | ||
| name: E2E tests | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 20 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Read Node version from mise.toml | ||
|
|
@@ -180,7 +237,7 @@ jobs: | |
| id: yarn-config | ||
| run: echo "cacheFolder=$(yarn config get cacheFolder)" >> "$GITHUB_OUTPUT" | ||
| - name: Restore yarn install cache (node_modules + cacheFolder + install-state) | ||
| uses: actions/cache@v4 | ||
| uses: actions/cache/restore@v4 | ||
| with: | ||
| path: | | ||
| node_modules | ||
|
|
@@ -197,6 +254,19 @@ jobs: | |
| run: | | ||
| case "$(yarn --version)" in 1.*) echo 'expected up-to-date yarn version'; exit 1 ;; esac | ||
| yarn install --immutable | ||
| - name: Save yarn install cache (node_modules + cacheFolder + install-state) | ||
| if: always() | ||
| uses: actions/cache/save@v4 | ||
| with: | ||
| path: | | ||
| node_modules | ||
| ${{ steps.yarn-config.outputs.cacheFolder }} | ||
| .yarn/install-state.gz | ||
| key: | ||
| yarn-${{ runner.os }}-node${{ steps.node.outputs.version }}-${{ hashFiles('yarn.lock') | ||
| }} | ||
| timeout-minutes: 5 | ||
| continue-on-error: true | ||
| - run: yarn build | ||
| - run: npx playwright install --with-deps chromium | ||
| - run: yarn test:e2e | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: game-ci/documentation
Length of output: 2665
🌐 Web query:
Codecov Bash uploader deprecated official documentation codecov.io/bash current💡 Result:
The Codecov Bash uploader has been officially deprecated and superseded by the Codecov CLI (Command Line Interface) [1][2]. Key information regarding this transition: 1. Status: The Bash uploader is no longer maintained or supported for new features, and users are strongly advised to migrate to the Codecov CLI [1][3]. 2. Migration: Codecov provides a dedicated migration guide for users transitioning away from the Bash uploader [4]. This involves replacing legacy Bash uploader calls with the modern Codecov CLI, which now powers the official Codecov integrations for CI/CD environments such as GitHub Actions, CircleCI, and Bitrise [1][2]. 3. Recommended Tools: For CI/CD environments, Codecov recommends using the latest versions of their official integrations (e.g., version 4.0.0+ for the GitHub Action, CircleCI Orb, and Bitrise Step), which utilize the CLI internally [2]. 4. Documentation: You can find the official guidance and migration steps in the Codecov documentation portal [4][1]. As of August 31, 2026, you should avoid using the legacy Bash uploader and instead update your CI pipelines to use the current Codecov CLI-based upload methods [1][2].
Citations:
Other (CWE-494): Download of Code Without Integrity Check
Reachability: External · Exploitability: Difficult
Replace the unpinned remote executable.
Line 216 executes mutable content from
https://codecov.io/bash. Altered content can run commands in the job and readCODECOV_TOKENfrom line 218. The Bash uploader is deprecated. Use the Codecov CLI-based action pinned to an immutable commit.🧰 Tools
🪛 zizmor (1.29.0)
[warning] 1-281: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block
(excessive-permissions)
[warning] 164-218: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block
(excessive-permissions)
🤖 Prompt for AI Agents