diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..b282753c --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,42 @@ +name: Tests + +on: + pull_request: + branches: + - master + - dev + workflow_dispatch: + +env: + EM_CACHE_FOLDER: "emsdk-cache" + +jobs: + tests: + runs-on: ubuntu-latest + steps: + - name: "Checkout" + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: "Setup pnpm" + uses: pnpm/action-setup@v4 + with: + run_install: false + + - name: "Setup node" + uses: actions/setup-node@v2 + with: + node-version: "23.6.0" + cache: "pnpm" + + - name: "Install dependencies" + run: pnpm install + + - name: "Install emscipten" + uses: "mymindstorm/setup-emsdk@v14" + with: + actions-cache-folder: ${{env.EM_CACHE_FOLDER}} + + - name: "Run tests" + run: pnpm test:unit