Skip to content

Commit

Permalink
Use bun on CI (#30)
Browse files Browse the repository at this point in the history
* Use bun on CI

* Update package.json
  • Loading branch information
joeldrapper authored Apr 6, 2024
1 parent baf184d commit 4abe3a3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 20 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,17 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: ".node-version"
cache: "npm"
- name: Setup Bun
uses: oven-sh/setup-bun@v1

- name: Install dependencies
run: npm install
run: bun install

- name: Build
run: npm run build
run: bun run build

- name: Lint
run: npm run lint
run: bun run lint

- name: Run Tests
run: npm run test || npm run test
run: bun run test || bun run test
21 changes: 10 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,16 @@
"url": "https://github.com/sponsors/joeldrapper"
},
"scripts": {
"test": "web-test-runner test/**/*.test.js --node-resolve",
"t": "web-test-runner --node-resolve",
"build": "npx tsc && prettier --write ./src ./dist",
"watch": "npx tsc -w",
"test:watch": "npm run test -- --watch",
"lint": "prettier --check ./src ./dist ./test",
"minify": "terser dist/morphlex.js -o dist/morphlex.min.js --config-file terser-config.json",
"prepare": "npm run build && npm run minify",
"ship": "npm run prepare && npm run test && npm run lint && npm publish",
"format": "prettier --write ./src ./dist ./test",
"size": "npm run prepare && gzip-size ./dist/morphlex.min.js --raw --include-original"
"test": "bun run web-test-runner test/**/*.test.js --node-resolve",
"build": "bun run tsc && bun run prettier --write ./src ./dist",
"watch": "bun run tsc -w",
"test:watch": "bun run test -- --watch",
"lint": "bun run prettier --check ./src ./dist ./test",
"minify": "bun run terser dist/morphlex.js -o dist/morphlex.min.js --config-file terser-config.json",
"prepare": "bun run build && bun run minify",
"ship": "bun run prepare && bun run test && bun run lint && bun run publish",
"format": "bun run prettier --write ./src ./dist ./test",
"size": "bun run prepare && bun run gzip-size ./dist/morphlex.min.js --raw --include-original"
},
"devDependencies": {
"@open-wc/testing": "^3.0.0-next.5",
Expand Down

0 comments on commit 4abe3a3

Please sign in to comment.