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

[C3] chore: fix dependabot so that it used the correct package version #5151

Merged
merged 5 commits into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
13 changes: 9 additions & 4 deletions .github/workflows/c3-e2e-dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@
name: C3 E2E Tests (Dependabot)

on:
pull_request_target:
pull_request:
paths:
- .changeset/c3-frameworks-update-*.md

env:
node-version: 18.17.1
bun-version: 1.0.3
# we need to fetch 3 commits because dependabot generates one, our changeset
# generation workflow generates another and we need the parent of both commits
# so that we can diff it (`git diff HEAD~n`) and see what package changed in
# the `package.json` file
COMMITS_TO_FETCH: 3

jobs:
get-dependabot-bumped-framework:
Expand All @@ -23,8 +28,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 3
ref: ${{ github.head_ref }}
fetch-depth: ${{ env.COMMITS_TO_FETCH }}

- name: detect-bumped-framework
id: detect
uses: actions/github-script@v6
Expand Down Expand Up @@ -55,7 +60,7 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v3
with:
fetch-depth: 0
Copy link
Member Author

@dario-piotrowicz dario-piotrowicz Mar 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: 0 would also work but it seems quite unnecessary in my opinion since it fetches everything (https://github.com/actions/checkout)

Screenshot 2024-03-05 at 13 29 51

but I'm happy to use 0 if we find it more clear/robust and don't care about the extra fetching, please let me know what you think 🙂

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've been going with 0 because it guarantees that all the tags are also there, and generally no one is complaining about performance. So I would err on that side. It is very confusing if something is missing from the cloned repo because the errors are a bit vague.

Copy link
Member Author

@dario-piotrowicz dario-piotrowicz Mar 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, changed to 0 🙂👍

fetch-depth: ${{ env.COMMITS_TO_FETCH }}

- name: Install Dependencies
uses: ./.github/actions/install-dependencies
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/c3-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ on:
env:
node-version: 18.17.1
bun-version: 1.0.3
# we need to fetch 3 commits because dependabot generates one, our changeset
# generation workflow generates another and we need the parent of both commits
# so that we can diff it (`git diff HEAD~n`) and see what package changed in
# the `package.json` file
COMMITS_TO_FETCH: 3

jobs:
e2e:
# Note: please keep this job in sync with the e2e-only-dependabot-bumped-framework one
Expand All @@ -32,7 +38,7 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v3
with:
fetch-depth: 0
fetch-depth: ${{ env.COMMITS_TO_FETCH }}

- name: Install Dependencies
uses: ./.github/actions/install-dependencies
Expand Down
Loading