Skip to content
Merged
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
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
jobs:
test:
runs-on: ubuntu-latest
env:
IS_CI_ENV: '1'
strategy:
fail-fast: false
matrix:
Expand All @@ -24,7 +26,7 @@ jobs:
cache: 'npm'

- name: Install dependencies
run: npm ci --no-optional

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

--no-optional is preventing Sharp from installing binaries, which are optional dependencies.

run: npm ci

- name: Test
run: npm test
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"mocha": "mocha -w -R spec",
"prettier": "npx prettier --write lib test",
"report": "nyc report --reporter=cobertura && nyc report --reporter=lcov",
"test": "npm run prettier && npm run test-and-check && npm outdated",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

npm outdated exits with a 1 when updates are available. Dependency updates don't seem like they should block PRs, but lmk your thoughts about that.

Now npm outdated can fail, and we'll still resolve it to true and not block the CI tests.

"test": "npm run prettier && npm run test-and-check && (npm outdated || true)",
"test-and-check": "npm run unit && npm run report && npm run check-cov",
"unit": "npx nyc ./node_modules/mocha/bin/_mocha"
},
Expand Down
4 changes: 2 additions & 2 deletions test/image-server.requests.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,8 @@ module.exports = [
},
];

if (process.env.TRAVIS === undefined) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Renamed this since we're no longer using Travis.

// not supported by travis CI
if (process.env.IS_CI_ENV === undefined) {
// Some image formats/steps are slower or not supported in CI.
module.exports = module.exports.concat([
{
steps: 'fm=f:avif',
Expand Down
Loading