Skip to content

Commit

Permalink
chore: speed up serving-functions test by pre-generating oclif manife…
Browse files Browse the repository at this point in the history
…st (#3517)

* chore: speed up serving-functions test by pre-generating oclif manifest

oclif spends a lot of time scanning the functions directory.
this adds up if we do it for every test, so we pre-generate it for testing.

* Revert "chore(ci): cache manifest file (#3508)"

This reverts commit 0eea04d.

Co-authored-by: Netlify Team Account 1 <[email protected]>
  • Loading branch information
1 parent 8b95a5c commit 3ec4a54
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ jobs:
- name: Linting
run: npm run format:ci
if: "${{ matrix.node-version == '*' && !steps.release-check.outputs.IS_RELEASE}}"
- name: Create manifest file
# This caches the commands, so oclif doesn't need to re-load them on each run of the CLI
run: npx oclif-dev manifest
- name: Tests
if: '${{ !steps.release-check.outputs.IS_RELEASE }}'
run: npm run test:ci
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"format:fix:prettier": "cross-env-shell prettier --write $npm_package_config_prettier",
"test:dev": "run-s test:init:* test:dev:*",
"test:ci": "run-s test:init:* test:ci:*",
"test:init:build": "run-s build:*",
"test:init:cli-version": "npm run start -- --version",
"test:init:cli-help": "npm run start -- --help",
"test:init:eleventy-deps": "npm ci --prefix tests/eleventy-site --no-audit",
Expand All @@ -65,7 +66,8 @@
"test:ci:ava": "nyc -r json ava",
"docs": "node ./site/scripts/docs.js",
"watch": "nyc --reporter=lcov ava --watch",
"prepack": "oclif-dev manifest && npm prune --prod",
"build:manifest": "oclif-dev manifest",
"prepack": "npm run build:manifest && npm prune --prod",
"postpack": "rm -f oclif.manifest.json && npm i",
"site:build": "run-s site:build:*",
"site:build:install": "cd site && npm ci --no-audit",
Expand Down

1 comment on commit 3ec4a54

@github-actions
Copy link

Choose a reason for hiding this comment

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

📊 Benchmark results

Package size: 357 MB

Please sign in to comment.