Skip to content
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

try filtering packages for checks and update go to 1.23.4 #164

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 27 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,42 @@ jobs:
name: Check packages
runs-on: ubuntu-22.04
steps:
# 1) Use dorny/paths-filter@v3 to detect changes in packages/**
- uses: dorny/paths-filter@v3
id: changes
with:
list-files: shell
filters: |
packages:
- 'packages/**'

# 2) Only checkout if there's a change in packages
- name: Checkout code
if: steps.changes.outputs.packages == 'true'
uses: actions/checkout@v4

- name: Install Brioche
if: steps.changes.outputs.packages == 'true'
run: |
mkdir -p ~/.local/bin
curl -L https://development-content.brioche.dev/github.com/brioche-dev/brioche/branches/main/x86_64-linux/brioche -o ~/.local/bin/brioche
chmod +x ~/.local/bin/brioche
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Check projects

# 3) Only run 'check' for the subdirectories under packages that changed
- name: Check updated packages
if: steps.changes.outputs.packages == 'true'
run: |
for project in packages/*; do
echo "::group::$project"
echo "Changed files:"
echo "${{ steps.changes.outputs.packages_files }}"

# Extract unique subdirectories in packages/ (e.g. packages/dir1) and run check
unique_projects=$(echo "${{ steps.changes.outputs.packages_files }}" \
| sed -E 's|(packages/[^/]+).*|\1|' \
| sort -u)

for project in $unique_projects; do
echo "::group::Check $project"
brioche check -p "$project" --locked
brioche fmt -p "$project" --check
echo "::endgroup::"
Expand Down
4 changes: 2 additions & 2 deletions packages/go/brioche.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/go/project.bri
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import caCertificates from "ca_certificates";

export const project = {
name: "go",
version: "1.23.1",
version: "1.23.4",
};

/**
Expand Down