feat: Shorten workflow job names, add required checks, optimize runners, and restrict permissions#228
feat: Shorten workflow job names, add required checks, optimize runners, and restrict permissions#228Copilot wants to merge 9 commits into
Conversation
Co-authored-by: limakzi <50334623+limakzi@users.noreply.github.com>
Co-authored-by: limakzi <50334623+limakzi@users.noreply.github.com>
Co-authored-by: limakzi <50334623+limakzi@users.noreply.github.com>
Co-authored-by: limakzi <50334623+limakzi@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR shortens verbose CI job names in the GitHub Actions workflow to improve readability and make the workflow status easier to scan at a glance.
Changes:
- Renamed
Code quality - unit-teststoCode - units - Renamed
Code quality - gaplinttoCode - lint
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot
jobs:
required:
name: "Required Checks: Test"
runs-on: namespace-profile-ghostty-xsm
needs:
- build-bench
- build-dist
- build-examples
- build-flatpak
- build-libghostty-vt
- build-linux
- build-linux-libghostty
- build-nix
- build-macos
- build-macos-freetype
- build-snap
- build-windows
- test
- test-simd
- test-gtk
- test-sentry-linux
- test-i18n
- test-macos
- pinact
- prettier
- alejandra
- typos
- shellcheck
- translations
- blueprint-compiler
- test-pkg-linux
- test-debian-13
- valgrind
- zig-fmt
steps:
- id: status
name: Determine status
run: |
results=$(tr -d '\n' <<< '${{ toJSON(needs.*.result) }}')
if ! grep -q -v -E '(failure|cancelled)' <<< "$results"; then
result="failed"
else
result="success"
fi
{
echo "result=${result}"
echo "results=${results}"
} | tee -a "$GITHUB_OUTPUT"
- if: always() && steps.status.outputs.result != 'success'
name: Check for failed status
run: |
echo "One or more required build workflows failed: ${{ steps.status.outputs.results }}"
exit 1 |
Co-authored-by: limakzi <50334623+limakzi@users.noreply.github.com>
Added the "Required checks - pull-request" job in commit 1ab0052. This job aggregates the status of both |
|
@copilot Try to simplify |
Co-authored-by: limakzi <50334623+limakzi@users.noreply.github.com>
Co-authored-by: limakzi <50334623+limakzi@users.noreply.github.com>
Co-authored-by: limakzi <50334623+limakzi@users.noreply.github.com>
Workflow job names were too verbose, making the workflow status difficult to scan. This PR shortens the job names across multiple workflows, adds a required checks aggregation job to fix status check issues, optimizes runner usage for better cost efficiency, and restricts GITHUB_TOKEN permissions for enhanced security.
Changes
CI workflow:
Code quality - unit-tests (${{ matrix.gap-branch }})→Code - units (${{ matrix.gap-branch }})Code quality - gaplint→Code - lintRequired checks - pull-requestjob that aggregates the status of all CI jobsgaptestandgaplint:contents: read(minimal read-only access)required: empty permissions{}(no GitHub API access needed)Labels workflow:
Labels - auto-create→Labels - autoRelease workflows:
Release the GAP package→ReleaseRelease draft - update release notes→Release - draftRunner optimization:
ubuntu-latest/ubuntu-22.04toubuntu-slimfor jobs that run under 15 minutes (addresses issue [Feature Request]: Add ubuntu-slim support #229)All changes in
.github/workflows/*.ymlfiles.The new required checks job depends on both
gaptestandgaplintjobs and will fail if any dependency fails. Configure "Required checks - pull-request" as a required status check in branch protection rules to ensure all CI jobs pass before merging.The explicit permissions follow security best practices by limiting GITHUB_TOKEN access using the principle of least privilege, preventing potential security vulnerabilities from overly permissive defaults.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.