Skip to content
Merged
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
11 changes: 10 additions & 1 deletion .github/workflows/npm-publish-simulation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
id: build
working-directory: mdn/fred
run: |
npm pkg set _gitSha=${{ github.sha }}
npm pack
TARBALL=`ls mdn-fred-*.tgz`
echo $TARBALL
Expand All @@ -58,6 +59,10 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- name: "Move npm cache to D: drive"
if: runner.os == 'Windows'
run: echo "npm_config_cache=D:\npm-cache" >> $env:GITHUB_ENV

- name: (mdn/content) Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
Expand All @@ -81,14 +86,18 @@ jobs:
working-directory: mdn/content
shell: bash
run: |
npm cache clean --force
TARBALL=$(ls ../../mdn-fred-*.tgz)
npm install file:$TARBALL
npm install
env:
# Increase GitHub API limit.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: (mdn/content) Verify correct fred installed
working-directory: mdn/content/node_modules/@mdn/fred
shell: bash
run: test "$(npm pkg get _gitSha --json)" = '"${{ github.sha }}"'
Comment on lines +96 to +99
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Given that we install Fred from the tarball, why should we ever get the wrong Fred version?

Copy link
Copy Markdown
Member Author

@LeoMcA LeoMcA May 26, 2026

Choose a reason for hiding this comment

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

I've observed weird behaviour locally where re-running npm pack after changes and re-installing that tarball would still use an old, cached, version. Perhaps this was a yarn limitation, but I think it makes sense to test/verify that we're not getting an older tarball from the cache.


- name: (mdn/content) Render (Linux)
if: runner.os == 'Linux'
working-directory: mdn/content
Expand Down
Loading