diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ca1b3e4..84ec98a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,18 +12,14 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: "Use Node.js 18.x" - uses: actions/setup-node@v3 - with: - node-version: 18.x - - run: npm ci - - run: npm run build:source - - run: npm run test - - if: github.event_name == 'push' && github.ref == 'refs/heads/main' && success() - uses: actions/setup-node@v3 - with: - node-version: 18.x - - run: npm run coverage + - name: Set up Bun + run: | + curl -fsSL https://bun.sh/install | bash + echo "::add-path::$(bun env | grep PATH | cut -d'=' -f2 | tr -d '\"')" + - name: Install dependencies + run: bun install + - name: Run tests + run: bun test - if: github.event_name == 'push' && github.ref == 'refs/heads/main' && success() name: Coveralls uses: coverallsapp/github-action@master diff --git a/package.json b/package.json index d5b0fb4..5675365 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "dev:web": "browser-sync start --config 'www/bs-config.js'", "build": "bun run build:source && bun run remark", "build:source": "cross-env NODE_ENV=production bun run source.js", - "test": "cross-env NODE_ENV=development bun test --bail", + "test": "cross-env NODE_ENV=development bun test --bail --coverage --coverage-reporter=lcov --coverage-reporter=text", "remark": "remark . -o", "commit": "git add . && git-cz && git push", "release": "release-it --verbose", diff --git a/test/node_test.js b/test/node_test.js index cbd596e..187adb5 100644 --- a/test/node_test.js +++ b/test/node_test.js @@ -173,11 +173,11 @@ span.hello{display: inline-block} it("should inline js", async () => { const { raw: indexTs } = await inline("./lib/index.ts", { compact: true, noValidate: true }); - const { raw: indexOld } = await inline("./bench/index-old.js", { compact: true }); + // const { raw: indexOld } = await inline("./bench/index-old.js", { compact: true }); // eslint-disable-next-line no-console console.log(indexTs.length); // eslint-disable-next-line no-console - console.log(indexOld.length); + // console.log(indexOld.length); }); it("should convert tsx to hyperscript by default", async () => {