Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

chore(ci): fix our npm caching strategy for our e2e nextjs tests #655

Merged
merged 5 commits into from
Sep 13, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 8 additions & 3 deletions .github/workflows/e2e-nextjs.yml
Expand Up @@ -2,9 +2,9 @@ name: Next.js Integration test

on:
pull_request:
branches: [main]
# Run on release PRs only
paths: ['CHANGELOG.md']
branches: [main, 'chore/ci-e2e-nextjs']
# Run on release PRs only, or changes to this same file
paths: ['CHANGELOG.md', '.github/workflows/e2e-nextjs.yml']
Copy link
Member

Choose a reason for hiding this comment

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

Should we remove this change before merging?

Copy link
Member

Choose a reason for hiding this comment

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

Actually, it kind of makes sense to run the CI when the workflow file changes, so maybe we should leave it?

Copy link
Member Author

Choose a reason for hiding this comment

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

If folks agree with it I would keep both these changes ☝️ similart to what we have with fossa -https://github.com/netlify/zip-it-and-ship-it/blob/main/.github/workflows/fossa.yml#L6-L7 - this way we have the ability to always test this during dev if needed be?

Copy link
Member Author

Choose a reason for hiding this comment

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

We could probably change the branch name though, maybe to something like chore/ci-e2e-nextjs? What do you think @eduardoboucas?

Copy link
Member

Choose a reason for hiding this comment

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

Oh, I see. So you'll use that branch whenever you want to test the flow? Sounds good to me!


jobs:
integration:
Expand Down Expand Up @@ -32,6 +32,11 @@ jobs:
with:
node-version: '*'
cache: 'npm'
# We need to add each of the lockfile paths so that the global npm cache is populated accordingly
cache-dependency-path: |
zip-it-and-ship-it/package-lock.json
netlify-plugin-nextjs/package-lock.json
netlify-cli/npm-shrinkwrap.json
- name: Installing netlify-cli
run: npm ci
working-directory: netlify-cli
Expand Down