Skip to content
Open
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
8 changes: 8 additions & 0 deletions .circleci/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,14 @@ workflows:
cypress-cache-key: cypress-cache{{ arch }}-{{ checksum "examples/pnpm-install/package.json" }}
post-install: "pnpm cypress install"
package-manager: "pnpm"
- cypress/run:
filters: *filters
name: Bun Example
working-directory: examples/bun-install
cypress-cache-key: cypress-cache{{ arch }}-{{ checksum "examples/bun-install/package.json" }}
post-install: "bunx cypress install"
package-manager: "bun"
cypress-command: "bunx cypress run"
- cypress/run:
filters: *filters
name: Custom Install Example
Expand Down
362 changes: 362 additions & 0 deletions examples/bun-install/bun.lock

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions examples/bun-install/cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const { defineConfig } = require("cypress");

module.exports = defineConfig({
fixturesFolder: false,
e2e: {
supportFile: false,
video: false
},
})
6 changes: 6 additions & 0 deletions examples/bun-install/cypress/e2e/spec.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
describe('Example Test', () => {
it('should pass', () => {
cy.log('This is a test using Bun package manager')
expect(true).to.equal(true)
})
})
11 changes: 11 additions & 0 deletions examples/bun-install/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "bun-install",
"version": "1.0.0",
"description": "Example Cypress project using Bun package manager",
"scripts": {
"test": "cypress run"
},
"devDependencies": {
"cypress": "^15.0.0"
}
}
30 changes: 25 additions & 5 deletions src/commands/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ parameters:
default: ""
package-manager:
type: enum
enum: ["npm", "yarn", "yarn-berry", "pnpm"]
enum: ["npm", "yarn", "yarn-berry", "pnpm", "bun"]
default: "npm"
description: Select the default node package manager to use. npm v5+ Required.
skip-checkout:
Expand Down Expand Up @@ -75,6 +75,13 @@ steps:
steps:
- node/install:
install-pnpm: true
- when:
condition:
and:
- equal: [ 'bun', << parameters.package-manager >> ]
steps:
- node/install:
install-bun: true
- node/install-packages:
override-ci-command: << parameters.install-command >>
app-dir: << parameters.working-directory >>
Expand All @@ -88,10 +95,23 @@ steps:
name: Post Install Script
command: << parameters.post-install >>
working_directory: << parameters.working-directory >>
- run:
name: Verify Cypress
command: "npx cypress verify"
working_directory: << parameters.working-directory >>
- when:
condition:
equal: [ 'bun', << parameters.package-manager >> ]
steps:
- run:
name: Verify Cypress
command: "bunx cypress verify"
working_directory: << parameters.working-directory >>
- when:
condition:
not:
equal: [ 'bun', << parameters.package-manager >> ]
steps:
- run:
name: Verify Cypress
command: "npx cypress verify"
working_directory: << parameters.working-directory >>
- save_cache:
name: Save Cypress Binary
key: << parameters.cypress-cache-key >>
Expand Down
15 changes: 15 additions & 0 deletions src/examples/bun.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
description: >
Run tests using Bun as the package manager.
Bun is an all-in-one JavaScript runtime & toolkit designed for speed,
complete with a bundler, test runner, and Node.js-compatible package manager.
usage:
version: "2.1"
orbs:
cypress: cypress-io/[email protected]
workflows:
use-my-orb:
jobs:
- cypress/run:
package-manager: "bun"
start-command: "bun cypress start"
install-command: "bun install --frozen-lockfile"
2 changes: 1 addition & 1 deletion src/jobs/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ parameters:
default: ""
package-manager:
type: enum
enum: ["npm", "yarn", "yarn-berry", "pnpm"]
enum: ["npm", "yarn", "yarn-berry", "pnpm", "bun"]
default: "npm"
description: Select the default node package manager to use. npm v5+ Required.
start-command:
Expand Down