diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 93946c4..5c6822e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,7 +3,7 @@ name: Test on: [push, pull_request] jobs: - test: + build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -12,29 +12,65 @@ jobs: with: node-version-file: ".node-version" - - uses: pnpm/action-setup@v2 - name: Install pnpm + - run: | + wget -P ${{ runner.temp }} https://github.com/tinygo-org/tinygo/releases/download/v0.28.1/tinygo_0.28.1_amd64.deb + yes | sudo dpkg -i ${{ runner.temp }}/tinygo_0.28.1_amd64.deb + - run: npm run build + - run: npm pack + - name: Upload + uses: actions/upload-artifact@v3 + with: + name: build + path: | + gofmt.js + gofmt.wasm + *.tgz + + deno-test: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@v3 + with: + name: build + path: ./ - uses: denoland/setup-deno@v1 name: Install Deno with: deno-version: v1.x - - uses: oven-sh/setup-bun@v1 - name: Install bun + - run: deno test test_deno --allow-read - - run: | - wget -P ${{ runner.temp }} https://github.com/tinygo-org/tinygo/releases/download/v0.28.1/tinygo_0.28.1_amd64.deb - yes | sudo dpkg -i ${{ runner.temp }}/tinygo_0.28.1_amd64.deb + node-test: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@v3 + with: + name: build + path: ./ - - run: npm run build - - run: pnpm run /^test:/ + - uses: actions/setup-node@v3 + name: Install Node + with: + node-version-file: ".node-version" - - name: Package - run: npm pack + - run: node --test test_node - - name: Upload - uses: actions/upload-artifact@v3 + bun-test: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@v3 with: - path: | - wasm-fmt-*.tgz + name: build + path: ./ + + - uses: oven-sh/setup-bun@v1 + name: Install bun + + - run: bun test test_bun diff --git a/package.json b/package.json index ceac81a..467b81a 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,6 @@ "test:deno": "deno test test_deno --allow-read", "test:bun": "bun test test_bun" }, - "packageManager": "pnpm@8.7.1", "engines": { "node": ">=16.17.0" },